private void DataListBind() { this.rptAdminUserList.DataSource = VShopHelper.GetAdminUserMsgList(1); this.rptAdminUserList.DataBind(); System.Collections.Generic.IList <MessageTemplate> aliFuWuMessageTemplates = VShopHelper.GetAliFuWuMessageTemplates(); this.rptAliFuWuMessageTemplateList.DataSource = aliFuWuMessageTemplates; this.rptAliFuWuMessageTemplateList.DataBind(); int num = 0; this.cbPowerListDistributors.Items.Clear(); foreach (System.Data.DataRow dataRow in VShopHelper.GetAdminUserMsgDetail(true).Rows) { System.Web.UI.WebControls.ListItem item = new System.Web.UI.WebControls.ListItem(dataRow["DetailName"].ToString(), dataRow["DetailType"].ToString()); this.cbPowerListDistributors.Items.Add(item); this.cbPowerListDistributors.Items[num].Selected = (dataRow["IsSelected"].ToString() == "1"); num++; } num = 0; this.cbPowerListMember.Items.Clear(); foreach (System.Data.DataRow dataRow2 in VShopHelper.GetAdminUserMsgDetail(false).Rows) { System.Web.UI.WebControls.ListItem item2 = new System.Web.UI.WebControls.ListItem(dataRow2["DetailName"].ToString(), dataRow2["DetailType"].ToString()); this.cbPowerListMember.Items.Add(item2); this.cbPowerListMember.Items[num].Selected = (dataRow2["IsSelected"].ToString() == "1"); num++; } SiteSettings masterSettings = SettingsManager.GetMasterSettings(false); this.WeixinAppId = masterSettings.WeixinAppId; this.hfAppID.Value = masterSettings.WeixinAppId; string token_Message = TokenApi.GetToken_Message(masterSettings.WeixinAppId, masterSettings.WeixinAppSecret); this.hfWeiXinAccessToken.Value = token_Message; this.ShowQRImage(); }
private void BindData() { this.rptAdminUserList.DataSource = VShopHelper.GetAdminUserMsgList(0); this.rptAdminUserList.DataBind(); this.rptList.DataSource = VShopHelper.GetMessageTemplates(); this.rptList.DataBind(); int num = 0; this.cbPowerListDistributors.Items.Clear(); foreach (DataRow row in VShopHelper.GetAdminUserMsgDetail(true).Rows) { ListItem item = new ListItem(row["DetailName"].ToString(), row["DetailType"].ToString()); this.cbPowerListDistributors.Items.Add(item); this.cbPowerListDistributors.Items[num].Selected = row["IsSelected"].ToString() == "1"; num++; } num = 0; this.cbPowerListMember.Items.Clear(); foreach (DataRow row2 in VShopHelper.GetAdminUserMsgDetail(false).Rows) { ListItem item2 = new ListItem(row2["DetailName"].ToString(), row2["DetailType"].ToString()); this.cbPowerListMember.Items.Add(item2); this.cbPowerListMember.Items[num].Selected = row2["IsSelected"].ToString() == "1"; num++; } this.WeixinAppId = this.siteSettings.WeixinAppId; this.hfAppID.Value = this.siteSettings.WeixinAppId; string str = TokenApi.GetToken_Message(this.siteSettings.WeixinAppId, this.siteSettings.WeixinAppSecret); this.hfWeiXinAccessToken.Value = str; this.ShowQRImage(); }