protected void Page_Load(object sender, EventArgs e) { try { System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); if (!IsPostBack) { txtOtherCity.Visible = false; tableResult.Visible = false; tr1.Visible = false; trProductN.Visible = false; trFeedBack.Visible = false; objCommonClass.BindLanguage_WEB(ddlLanguage); trFrames.Visible = false; objCommonClass.BindStateForWebForm(ddlState, 1); ddlState.Items.FindByText("INTERNATIONAL COUNTRIES").Enabled = false; objCommonClass.BindProductDivisionWithOutCode(ddlProductDiv); // Remove product division of LT and FHP ddlProductDiv.Items.Remove(ddlProductDiv.Items.FindByValue("15")); ddlProductDiv.Items.Remove(ddlProductDiv.Items.FindByValue("19")); objCommonClass.BindProductDivisionWithOutCode(ddlDivision); ddlDivision.Items.Remove(ddlDivision.Items.FindByValue("15")); ddlDivision.Items.Remove(ddlDivision.Items.FindByValue("19")); objCallRegistration.BindModeOfReciept(ddlModeOfRec); //Create table to bind product CreateTable(); DataTable dTableF = new DataTable("tblInsert"); DataColumn dClFileName = new DataColumn("FileName", System.Type.GetType("System.String")); dTableF.Columns.Add(dClFileName); ViewState["dTableFile"] = dTableF; ViewState["ds"] = dsProduct; if (User.IsInRole("SC")) { ChkLst.SelectedIndex = 1; ChkLst.Enabled = false; trlogin.Visible = true; TxtSCName.Text = User.Identity.Name; TxtSCName.Enabled = false; BtnGo.Enabled = false; tblenable.Enabled = true; LblLogin.Text = "Login Validated."; objwscfeedback.GetSCNo(TxtSCName.Text); TxtSCName.Attributes.Add("SC_SNo", Convert.ToString(objwscfeedback.SC_SNo)); } } } catch (Exception ex) { CommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.Session["WSCDivsN"] == null) { Response.Redirect("../WSC/WSCSalesServiceLinkIS.aspx"); } try { System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); if (!IsPostBack) { txtOtherCity.Visible = false; tableResult.Visible = false; tblenable.Enabled = false; trFrames.Visible = false; objCommonClass.BindStateForWebForm(ddlState, 1); ddlState.Items.FindByText("INTERNATIONAL COUNTRIES").Enabled = false; objCommonClass.BindProductDivisionWithOutCode(ddlProductDiv); // Remove CP division product ddlProductDiv.Items.Remove(ddlProductDiv.Items.FindByValue("13")); ddlProductDiv.Items.Remove(ddlProductDiv.Items.FindByValue("14")); ddlProductDiv.Items.Remove(ddlProductDiv.Items.FindByValue("16")); ddlProductDiv.Items.Remove(ddlProductDiv.Items.FindByValue("18")); objCallRegistration.BindModeOfReciept(ddlModeOfRec); lblpname.Text = Convert.ToString(Session["WSCDivsN"]); //Create table to bind product CreateTable(); DataTable dTableF = new DataTable("tblInsert"); DataColumn dClFileName = new DataColumn("FileName", System.Type.GetType("System.String")); dTableF.Columns.Add(dClFileName); ViewState["dTableFile"] = dTableF; ViewState["ds"] = dsProduct; String ProdDivsSelected = Convert.ToString(Session["WSCDivs"]); if (User.IsInRole("SC")) { ChkLst.SelectedIndex = 1; ChkLst.Enabled = false; trlogin.Visible = true; TxtSCName.Text = User.Identity.Name; TxtSCName.Enabled = false; BtnGo.Enabled = false; tblenable.Enabled = true; LblLogin.Text = "Login Validated."; objwscfeedback.GetSCNo(TxtSCName.Text); TxtSCName.Attributes.Add("SC_SNo", Convert.ToString(objwscfeedback.SC_SNo)); } if (!string.IsNullOrEmpty(ProdDivsSelected)) { ddlProductDiv.Items.FindByValue(ProdDivsSelected).Selected = true; ddlProductDiv_SelectedIndexChanged(ddlProductDiv, null); objCommonClass.BindProductLineWithoutCode(DDlPL, int.Parse(ProdDivsSelected)); } } } catch (Exception ex) { CommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString()); } }