asp.net微信开发(用户分组管理)

asp.net微信开发(用户分组管理)

直接上代码,废话不多说,获取分组列表需要用到的实体类

/// <summary> /// 微信分组类 /// </summary> public class WxGroupsInfo { public string Group_ID { get; set; }//分组编号 public string Group_Name { get; set; }//分组名称 public string Group_Count { get; set; }//分组人数 }

前台代码:

<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> <link href="https://www.jb51.net/css/style.css" type="text/css" /> <style type="text/css"> .inputstyle { height:35px; line-height:35px; text-indent:5px; width:350px;background-image:url('images/inputbg.gif'); background-repeat:repeat-x;border-top:solid 1px #a7b5bc; border-left:solid 1px #a7b5bc; border-right:solid 1px #ced9df; border-bottom:solid 1px #ced9df;margin:15px auto 15px auto; } a:hover { cursor:pointer; } .g_title { width:100%; border-bottom:2px solid #ced9df;font-size:20px; font-weight:bold; text-align:left; text-indent:5px; height:40px; line-height:40px; } th { height:35px;background-image:url('images/th.gif'); background-repeat:repeat-x; } tr { height:30px; } #shownewgroup { width:300px; height:200px; background-color:white;z-index:9999; border:2px solid #DDD; top:40%; left:40%; background-color:#fff; position:fixed;margin:-100px auto auto -100px; display:none; } #shownewgroupzhezhaoceng { height:200%; width:200%; left:0px; top:0px;position:fixed; z-index:9998; background:rgb(50,50,50);background:rgba(0,0,0,0.5); display:none; } .closeLogin { height:30px; border-bottom:2px solid #31bb34; text-align:right; line-height:30px; font-size:14px; font-weight:bold; } a:hover { cursor:pointer; } .inputstyle22 { height:35px; line-height:35px; text-indent:5px; width:280px;background-image:url('images/inputbg.gif'); background-repeat:repeat-x;border-top:solid 1px #a7b5bc; border-left:solid 1px #a7b5bc; border-right:solid 1px #ced9df; border-bottom:solid 1px #ced9df; float:left; margin:auto 5px auto 5px; } </style> <script src="https://www.jb51.net/js/jquery-1.7.1.min.js" type="text/javascript"></script> <script type="text/javascript">        //修改分组名称调用的函数 function EditRoster(PayNo,name) { //alert(PayNo+":"+name); var url = '****.aspx?id=' + PayNo+"&name="+name;//转向网页的地址; var name = 'add'; //网页名称,可为空; var iWidth = 600; //弹出窗口的宽度; var iHeight = 300; //弹出窗口的高度; //获得窗口的垂直位置 var iTop = (window.screen.availHeight - 30 - iHeight) / 2; //获得窗口的水平位置 var iLeft = (window.screen.availWidth - 10 - iWidth) / 2; window.open(url, name, 'height=' + iHeight + ',innerHeight=' + iHeight + ',width=' + iWidth + ',innerWidth=' + iWidth + ',top=' + iTop + ',left=' + iLeft + ',status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no'); } $(document).ready(function () { $(".newGroups").click(function () { $("#shownewgroupzhezhaoceng").show(); $("#shownewgroup").show(); }), $('.closeloginpage').click(function () { $("#shownewgroupzhezhaoceng").hide(); $("#shownewgroup").hide(); }) }) </script> </head> <body> <form runat="server"> <div> <span>位置:</span> <ul> <li><a href="https://www.jb51.net/WelCome.aspx" target="rightFrame">首页</a></li> <li>微信管理</li> <li>德桥员工服务中心----分组管理</li> </ul> </div> <div>分组管理</div> <div> <div><a><span>新建分组</span>关闭</a>&nbsp;&nbsp;</div> <div>&nbsp;&nbsp;30字符以内</div> <input type="text" maxlength="30" runat="server" value="分组名称" onfocus="if(value==defaultValue){value='';this.style.color='#000'}" onblur="if(!value){value=defaultValue;this.style.color='#999'}"/> <asp:LinkButton runat="server"><div>&nbsp;确定创建</div></asp:LinkButton> </div> <div></div> <table> <asp:Repeater runat="server" OnItemCommand="RepeaterGroupList_ItemCommand" OnItemDataBound="RepeaterGroupList_ItemDataBound"> <HeaderTemplate> <tr> <th>序号</th> <th>ID编号</th> <th>分组名称</th> <th>分组人数</th> <th>操作</th> </tr> </HeaderTemplate> <ItemTemplate> <tr> <td><asp:Label runat="server" Text=""></asp:Label></td> <td><%# Eval("Group_ID") %></td> <td><%# Eval("Group_Name") %></td> <td><%# Eval("Group_Count") %></td> <td> <aGroup_ID") %>','<%# Eval("Group_Name") %>');">修改分组名称</a>&nbsp; &nbsp;&nbsp;<asp:LinkButton runat="server" CommandName="DeleteGroups" CommandArgument='<%# Eval("Group_ID") %>' >删除分组</asp:LinkButton> </td> </tr> </ItemTemplate> </asp:Repeater> </table> <a><div>&nbsp;┼&nbsp;新建分组</div></a> </form> </body> </html>

后台代码如下:
 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wjwjjx.html