你的位置:首页 > 软件开发 > ASP.net > asp.net微信开发第五篇

asp.net微信开发第五篇

发布时间:2015-10-27 17:00:16
上一篇已讲解到新建用户分组,移动用户到分组的功能,这一章主要讲解修改分组名称和删除分组 开发者可以使用接口,对公众平台的分组进行查询、创建、修改、删除等操作,也可以使用接口在需要时移动用户到某个分组。目录1 创建分组2 查询所有分组3 查询用户所在分组4 修改分组名5 移动用 ...

上一篇已讲解到新建用户分组,移动用户到分组的功能,这一章主要讲解修改分组名称和删除分组

asp.net微信开发第五篇

 

开发者可以使用接口,对公众平台的分组进行查询、创建、修改、删除等操作,也可以使用接口在需要时移动用户到某个分组。

目录

直接上代码,废话不多说,获取分组列表需要用到的实体类
 /// <summary>  /// 微信分组类  /// </summary>  public class WxGroupsInfo  {    public get='_blank'>string Group_ID { get; set; }//分组编号    public string Group_Name { get; set; }//分组名称    public string Group_Count { get; set; }//分组人数  }
       //修改分组名称调用的函数 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 id="form1" runat="server"> <div class="place"> <span>位置:</span> <ul class="placeul"> <li><a href="WelCome.aspx" target="rightFrame">首页</a></li> <li>微信管理</li> <li>德桥员工服务中心----分组管理</li> </ul> </div> <div class="g_title">分组管理</div> <div id="shownewgroup"> <div class="closeLogin"><a class="closeloginpage"><span style="float:left; color:#08a5e0; font-size:18px; text-indent:5px;">新建分组</span>关闭</a>&nbsp;&nbsp;</div> <div style="font-size:12px; height:40px; color:red; line-height:40px;">&nbsp;&nbsp;30字符以内</div> <input type="text" id="txtgroupsName" name="txtgroupsName" class="inputstyle22" maxlength="30" runat="server" value="分组名称" onfocus="if(value==defaultValue){value='';this.style.color='#000'}" onblur="if(!value){value=defaultValue;this.style.color='#999'}" style="color:#999"/> <asp:LinkButton ID="LinkBtnCreateGroup" runat="server" OnClick="LinkBtnCreateGroup_Click"><div style="background-image:url('images/buttonbg.png'); width:111px; height:35px; line-height:35px; font-weight:bold;float:left; margin-top:20px; margin-left:5px; text-align:center;color:#fff;">&nbsp;确定创建</div></asp:LinkButton> </div> <div id="shownewgroupzhezhaoceng"></div> <table style="width:1124px; margin:10px auto 10px auto; border:1px solid #ecd9df;text-align:center;"> <asp:Repeater ID="RepeaterGroupList" 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 style='background-color: <%#(Container.ItemIndex%2==0)?"#fff":"#ced9ff"%>'> <td><asp:Label ID="lbXuHao" runat="server" Text=""></asp:Label></td> <td><%# Eval("Group_ID") %></td> <td><%# Eval("Group_Name") %></td> <td><%# Eval("Group_Count") %></td> <td> <a onclick="EditRoster('<%# Eval("Group_ID") %>','<%# Eval("Group_Name") %>');">修改分组名称</a>&nbsp; &nbsp;&nbsp;<asp:LinkButton ID="LinkBtnDeleteGroup" runat="server" CommandName="DeleteGroups" CommandArgument='<%# Eval("Group_ID") %>' >删除分组</asp:LinkButton> </td> </tr> </ItemTemplate> </asp:Repeater> </table> <a class="newGroups"><div style="background-image:url('images/buttonbg.png'); width:111px; height:35px; line-height:35px; margin:10px auto 10px 28px; font-weight:bold;float:left; text-align:center;color:#fff;">&nbsp;┼&nbsp;新建分组</div></a> </form></body></html>

 

海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com

原标题:asp.net微信开发第五篇

关键词:ASP.NET

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。