protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { this.BindGoodsClassList(this.CurShopID); this.share.Value = PubFunction.GetControlVisit(PubFunction.GetUserAuthority(this._UserGroupID), 120, 73).ToString().ToLower(); } }
protected void Application_Start(object sender, EventArgs e) { Hashtable Online = new Hashtable(); base.Context.Cache.Insert("Online", Online); base.Context.Cache["count"] = 0; string SafetyVerification = ConfigHelper.GetValue("SafetyVerification"); SafetyVerification = DEncrypt.EncryptDecrypt(SafetyVerification); SafetyVerification = DEncrypt.EncryptDecrypt(SafetyVerification); try { PubFunction.ISCheckKey = bool.Parse(SafetyVerification); } catch { PubFunction.ISCheckKey = true; } if (PubFunction.ISCheckKey) { string SafetyKey = INIFile.IniReadValue("SysConfig", "license"); string[] Hardware = SafetyKey.Split(new char[] { '-' }); for (int i = 0; i < Hardware.Length; i++) { this.HardwareID.Add(i, Hardware[i].ToString()); } base.Application["HardwareID"] = this.HardwareID; } DataTable db = PubFunction.GetUserAuthority(1); for (int i = 0; i < db.Rows.Count; i++) { string f = db.Rows[i]["ActionControl"].ToString(); string h = db.Rows[i]["ActionControl"].ToString(); if (db.Rows[i]["ActionControl"].ToString() != "page" && db.Rows[i]["ActionControl"].ToString() != "module") { db.Rows[i]["ActionValue"] = "false"; } } base.Application["Authority"] = db; TaskConfig.Init(base.Server.MapPath("~")); TaskManager.Instance.Initialize(TaskConfig.ScheduleTasks); TaskManager.Instance.Start(); }
private void Set_GroupPageAcctionPer() { DataTable db = PubFunction.GetUserAuthority(int.Parse(this.HidGid.Value)); for (int i = 0; i < this.gdGroupPermission.Items.Count; i++) { CheckBoxList Permission = (CheckBoxList)this.gdGroupPermission.Items[i].FindControl("ChkListPerm"); Label lblMenuID = (Label)this.gdGroupPermission.Items[i].FindControl("lblMenuID"); DataRow[] dr = db.Select("ModuleID=" + lblMenuID.Text); DataRow[] array = dr; for (int j = 0; j < array.Length; j++) { DataRow drw = array[j]; foreach (ListItem it in Permission.Items) { if (it.Value == drw["ActionID"].ToString()) { Permission.Attributes.Add("class", "chk"); it.Selected = Convert.ToBoolean(drw["ActionValue"].ToString()); } } } } }