protected void Page_Load(object sender, EventArgs e) { if (Session["user"] == null) { Response.Redirect("../Default.aspx"); } else if ((Convert.ToInt32(Session["typeID"]) != 1)) { Response.Redirect("../Default.aspx"); } else { string user = Session["user"].ToString(); username.Text = user; username1.Text = user; } if (!Page.IsPostBack) { DropDownModule.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { string language = Session["mylang"].ToString(); check.LanguageCheck(language); base.InitializeCulture(); wfname = Request.QueryString["WfName"]; txtboxName.Text = wfname; txtboxName.Enabled = false; // Response.Write(language); if (language == "en-US") { c = 'e'; } else { c = 'f'; } if (!Page.IsPostBack) { //lbltxt.Text = "1st time"; DataTable dt_module = fill_module(c); DropDownModule.DataSource = dt_module; DropDownModule.DataTextField = "Str"; DropDownModule.DataValueField = "Id"; DropDownModule.DataBind(); DataTable dt_category = fill_category(c); DropDownCategory.DataSource = dt_category; DropDownCategory.DataTextField = "Str"; DropDownCategory.DataValueField = "Id"; DropDownCategory.DataBind(); WorkflowsService workflowsService = new WorkflowsService(); List <LoadWorkflowStepsDTO> wfsdto = workflowsService.LoadWorkflowStepsDTO(txtboxName.Text); if (wfsdto.Count > 0) { DataTable dtsteps = new DataTable(); dtsteps.Columns.Add("Str", typeof(string)); dtsteps.Columns.Add("Id", typeof(string)); foreach (LoadWorkflowStepsDTO wfs in wfsdto) { DataRow row = dtsteps.NewRow(); row["Id"] = wfs.step_Id; row["Str"] = wfs.step_Screen_Name; dtsteps.Rows.Add(row); } GridViewSteps.DataSource = dtsteps; GridViewSteps.DataBind(); GridViewSteps.Columns[2].Visible = false; ViewState["dtTable"] = dtsteps; } } }