/// <summary> /// InitData /// </summary> protected override void InitData() { _data = new SupportTicketAddTDS(); }
// //////////////////////////////////////////////////////////////////////// // INITIAL EVENTS // protected void Page_Load(object sender, EventArgs e) { // Register client scripts this.RegisterClientScripts(); if (!IsPostBack) { // Security check if (!(Convert.ToBoolean(Session["sgLFS_ITTST_SUPPORTTICKET_ADMIN"]))) { if (!(Convert.ToBoolean(Session["sgLFS_ITTST_SUPPORTTICKET_VIEW"]))) { 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 supportTicket_add.aspx"); } // Tag Page TagPage(); // Initialize viewstate variables ViewState["StepFrom"] = "Out"; Session.Remove("supportTicketAddTDS"); arrayCategoriesSelectedForAdd = new ArrayList(); Session["arrayCategoriesSelectedForAdd"] = arrayCategoriesSelectedForAdd; // If coming from // ... supportTicket_navigator.aspx, supportTicket_navigator2.aspx, supportTicket_summary.aspx or wucSRUnassigned.ascx if ((Request.QueryString["source_page"] == "supportTicket_navigator.aspx") || (Request.QueryString["source_page"] == "supportTicket_navigator2.aspx") || (Request.QueryString["source_page"] == "supportTicket_summary.aspx") || (Request.QueryString["source_page"] == "wucSRUnassigned.ascx") || (Request.QueryString["source_page"] == "wucAlarms.ascx.cs")) { // ... Initialize tables supportTicketAddTDS = new SupportTicketAddTDS(); // ... For Categories supportTicketCategoriesTDS = new SupportTicketCategoriesTDS(); SupportTicketCategory supportTicketCategory = new SupportTicketCategory(supportTicketCategoriesTDS); supportTicketCategory.Load(int.Parse(hdfCompanyId.Value)); // ... Store tables Session["supportTicketAddTDS"] = supportTicketAddTDS; Session["supportTicketCategoriesTDS"] = supportTicketCategoriesTDS; } // StepSection1In wzSupportTicket.ActiveStepIndex = 0; StepBeginIn(); } else { // Restore tables arrayCategoriesSelectedForAdd = (ArrayList)Session["arrayCategoriesSelectedForAdd"]; supportTicketAddTDS = (SupportTicketAddTDS)Session["supportTicketAddTDS"]; supportTicketCategoriesTDS = (SupportTicketCategoriesTDS)Session["supportTicketCategoriesTDS"]; } }