protected void Page_Load(object sender, EventArgs e) { if (function.isAjax()) { string result = "", action = Request.Form["action"]; int appid = DataConverter.CLng(Request.Form["appid"]); api = WxAPI.Code_Get(appid); switch (action) { case "del": result = api.DelWxMaterial(Request.Form["media_id"], Request.Form["type"]); break; default: break; } Response.Write(result); Response.Flush(); Response.End(); } if (AppId > 0) { api = WxAPI.Code_Get(AppId); } if (!IsPostBack) { DataTable dt = appBll.Sel(); WxApp_RPT.DataSource = dt; WxApp_RPT.DataBind(); Datas_Hid.Value = GetConfigData(dt); Call.SetBreadCrumb(Master, "<li><a href='" + customPath2 + "Main.aspx'>工作台</a></li><li><a href='" + customPath2 + "WeiXin/WxAppManage.aspx'>公众号管理</a></li><li class='active'>素材管理 [<a href='MsgsSend.aspx?action=add&appid=" + AppId + "'>添加素材</a>]</li>"); } }
public void MyBind() { WxApp_RPT.DataSource = appBll.Sel(); WxApp_RPT.DataBind(); List <M_WxGroupInfo> groups = api.GetWxGroup(); foreach (M_WxGroupInfo item in groups) { ListItem li = new ListItem(item.name, item.id.ToString()); WxGroup_D.Items.Add(li); } WxGroup_D.Items.Insert(0, "所有分组"); }
protected void Page_Load(object sender, EventArgs e) { api = WxAPI.Code_Get(AppID); if (!IsPostBack) { CheckSend(); WxApp_RPT.DataSource = appbll.Sel(); WxApp_RPT.DataBind(); string alias = " [公众号:" + api.AppId.Alias + "]"; if (!string.IsNullOrEmpty(Action) && Action.Equals("add")) { Save_Btn.Visible = false; SaveNew_B.Visible = true; } if (!string.IsNullOrEmpty(MediaID)) { MyBind(); } Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='" + CustomerPageAction.customPath2 + "WeiXin/WxMaterial.aspx?type=news'>素材管理</a></li><li class='active'>图文群发" + api.AppId.Alias + "</li>"); } }