using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Data.OleDb; namespace Mtxfw.VipSite { public partial class Admin_Member_hfczsz : Mtxfw.Utility.MemberBase { Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info(); Mtxfw.DAL.user_Results daoResults = new Mtxfw.DAL.user_Results(); Mtxfw.Utility.Config Config = new Mtxfw.Utility.Config(""); public string times = "", groups = ""; public int gtype = 0; #region 判断页面是否刷新 private bool _refreshState; private bool _isRefresh; /// /// 判断页面是否刷新 /// public bool IsRefresh { get { return _isRefresh; } } protected override void LoadViewState(object savedState) { object[] allStates = (object[])savedState; base.LoadViewState(allStates[0]); _refreshState = (bool)allStates[1]; _isRefresh = _refreshState == (bool)Session["__ISREFRESH"]; } protected override object SaveViewState() { Session["__ISREFRESH"] = _refreshState; object[] allStates = new object[2]; allStates[0] = base.SaveViewState(); allStates[1] = !_refreshState; return allStates; } #endregion protected override void OnLoad(EventArgs e) { base.OnLoad(e); string hostname = Request.Url.Host; if (!IsPostBack) { if (Session["IFPassword"] == null) { Response.Redirect("/Member_IFPassword.aspx?Url=/Admin_Member_hfczsz.aspx"); } if (IFStores != 1) { Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx"); } if (MemberJS.IndexOf("话费充值设置") == -1) { Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx"); } Data_Bind(); Page.Title = "话费充值设置 - " + GetWebName; } Btn_Save.Click += delegate (object s, EventArgs ex) { bool b = true; Config.webMoney153 = txtgroups.Value; Config.webMoney154 = Text_webMoney154.Text; Config.Save(); Model.User_CZ_log logmodel = new Model.User_CZ_log(); logmodel.MemberId = Card; logmodel.AddTime = DateTime.Now; logmodel.IP = Mtxfw.Utility.Common.GetIP; logmodel.Body = "修改话费充值设置"; logmodel.UType = 0; logmodel.gtype = gtype; new DAL.User_CZ_log().Add(logmodel); ClientScript.RegisterStartupScript(this.GetType(), "", ""); }; } protected void Data_Bind() { if (Config.webMoney153 != "") { string[] astr = Config.webMoney153.Split('|'); int i = 0; foreach (string str in astr) { if (str != "") { string[] astr1 = str.Split(','); string stitle = "", strkc = ""; if (astr1.Length > 0) { stitle = astr1[0]; } if (astr1.Length > 1) { strkc = astr1[1]; } groups += ""; i += 1; } } } Text_webMoney154.Text = Config.webMoney154; } } }