protected override void OnInit(EventArgs e) { base.OnInit(e); help = new helper(); ps = new CECInputFormService(); }
protected override void OnLoad(EventArgs e) { //inputTabs.ClientIDMode = ClientIDMode.Static; CECWebSrv = new CECInputFormService(); System.Data.DataTable dt_sections = CECWebSrv.GetInputFieldsSections(UserToken); foreach (DataRow dr in dt_sections.Rows) { string linkQueryStr = ""; if (Request.QueryString.Count > 0) { foreach (string s in Request.QueryString) { if (s.Contains("section")) { continue; } linkQueryStr = String.Format("{0}={1}&", s, Request.QueryString[s]); } } linkQueryStr += String.Format("section={0}", dr["id"]); linkQueryStr = linkQueryStr.TrimEnd('&'); System.Web.UI.HtmlControls.HtmlAnchor link = new HtmlAnchor(); link.InnerHtml = String.Format("{0}", dr["label_text"]); link.HRef = String.Format("/input/edit.aspx?{0}", linkQueryStr); System.Web.UI.HtmlControls.HtmlGenericControl span = new HtmlGenericControl("span"); span.Attributes["class"] = "arrow down"; System.Web.UI.HtmlControls.HtmlGenericControl li = new HtmlGenericControl("li"); li.Controls.Add(link); li.Controls.Add(span); if (Request.QueryString["section"] == dr["id"].ToString()) { li.Attributes["class"] = "active"; } inputTabs.Controls.Add(li); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); CECWebSrv = new CECInputFormService(); if (Request.Cookies["sessionid"] != null && Session["UserSecurityToken"] == null) { try { SecurityToken sec = CECWebSrv.GetSecurityToken(int.Parse(Request.Cookies["uid"].Value), Request.Cookies["sessionid"].Value); Session["UserSecurityToken"] = sec; } catch { Response.Redirect("/", true); } } if (UserToken.access_level < 200) { Response.Redirect("/input/edit.aspx", true); } }