// //////////////////////////////////////////////////////////////////////// // INITIAL EVENTS // protected void Page_Load(object sender, EventArgs e) { // Register client scripts this.RegisterClientScripts(); if (!IsPostBack) { // Security check if (!(Convert.ToBoolean(Session["sgLFS_FLEETMANAGEMENT_TODOLIST_ADD"]))) { Response.Redirect("./../../error_page.aspx?error=" + "You are not authorized to view this page. Contact your system administrator."); } // Validate query string if (((string)Request.QueryString["source_page"] == null) || ((string)Request.QueryString["dashboard"] == null)) { Response.Redirect("./../../error_page.aspx?error=" + "Invalid query string in toDoList_add.aspx"); } // Tag Page TagPage(); // Initialize viewstate variables ViewState["StepFrom"] = "Out"; Session.Remove("toDoListAddTDS"); // If coming from // ... toDoList_navigator.aspx, toDoList_navigator2.aspx, toDoList_summary.aspx or wucSRUnassigned.ascx if ((Request.QueryString["source_page"] == "toDoList_navigator.aspx") || (Request.QueryString["source_page"] == "toDoList_navigator2.aspx") || (Request.QueryString["source_page"] == "toDoList_summary.aspx") || (Request.QueryString["source_page"] == "wucSRUnassigned.ascx") || (Request.QueryString["source_page"] == "wucAlarms.ascx.cs")) { // ... Initialize tables toDoListAddTDS = new ToDoListAddTDS(); // ... Store tables Session["toDoListAddTDS"] = toDoListAddTDS; } // StepSection1In wzToDoList.ActiveStepIndex = 0; StepBeginIn(); } else { // Restore tables toDoListAddTDS = (ToDoListAddTDS)Session["toDoListAddTDS"]; } }
/// <summary> /// InitData /// </summary> protected override void InitData() { _data = new ToDoListAddTDS(); }