protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { CommonClass cc = new CommonClass(); cc.BindProductDivision(ddlUnit); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { objCommonClass.BindState(ddlState, 1); objCommonClass.BindProductDivision(ddlProductDiv); scl.BindAI_SCInfo(GvExcel); // Bind SC List : Bhawesh 11-7-13 } }
protected void Page_Load(object sender, EventArgs e) { try { txtFromDate.Attributes.Add("onchange", "SelectDate();"); txtToDate.Attributes.Add("onchange", "SelectDate();"); btnSearch.Attributes.Add("onclick", "SelectDate();"); objCommonMIS.EmpId = Membership.GetUser().UserName.ToString(); objCommonMIS.BusinessLine_Sno = "2"; objCommonMIS.RegionSno = "0"; objCommonMIS.BranchSno = "0"; if (!Page.IsPostBack) { TimeSpan duration = new TimeSpan(0, 0, 0, 0); txtFromDate.Text = DateTime.Now.Add(duration).ToShortDateString(); txtToDate.Text = DateTime.Now.Add(duration).ToShortDateString(); cls.BindProductDivision(ddlProductDivison); objCommonMIS.GetUserRegionsMTS_MTO(ddlRegion); if (ddlRegion.Items.Count == 2) { ddlRegion.SelectedIndex = 1; } if (ddlRegion.Items.Count != 0) { objCommonMIS.RegionSno = ddlRegion.SelectedValue; } else { objCommonMIS.RegionSno = "0"; } objCommonMIS.GetUserBranchs(ddlBranch); if (ddlBranch.Items.Count == 2) { ddlBranch.SelectedIndex = 1; } objCommonMIS.BranchSno = ddlBranch.SelectedValue; //objWithinwarrantyCostReport.ASC_Id = 0; //objWithinwarrantyCostReport.BindProductDivisionData(ddlProductDivison); //objWithinwarrantyCostReport.ProductDivision_Id = 0; } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); } catch (Exception ex) { CommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { objCommonMIS.BindRegion(ddlRegion); objCommonMIS.BindProductDivision(ddlProductDivison); } else { if (DateTime.Now.Month <= 3) { year = year - 1; } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { string[] names; int countElements; names = Enum.GetNames(typeof(MyMnth)); for (countElements = 0; countElements <= names.Length - 1; countElements++) { ddlMonth.Items.Add(new ListItem(names[countElements], countElements.ToString())); } // Initilizise the default values ddlMonth.Items[1].Selected = true; Ddlyear.Items.FindByText(DateTime.Today.Year.ToString()).Selected = true; objCommonMIS.BindRegion(ddlRegion); objCommonMIS.BindProductDivision(ddlProductDivison); ddlRegion.Items[0].Value = "0"; ddlRegion.Items[0].Text = "All"; ddlProductDivison.Items[0].Text = "All"; } }
protected void Page_Load(object sender, EventArgs e) { try { objCommonMIS.EmpId = Membership.GetUser().UserName.ToString(); objCommonMIS.BusinessLine_Sno = "2"; objCommonMIS.RegionSno = "0"; objCommonMIS.BranchSno = "0"; if (!Page.IsPostBack) { cc.BindProductDivision(ddlProductDivison); TimeSpan duration = new TimeSpan(0, 0, 0, 0); txtFromDate.Text = DateTime.Now.Add(duration).ToShortDateString(); txtToDate.Text = DateTime.Now.Add(duration).ToShortDateString(); if (objCommonMIS.CheckLoogedInASC() > 0) { objCommonMIS.GetASCRegions(ddlRegion); if (ddlRegion.Items.Count == 2) { ddlRegion.SelectedIndex = 1; } if (ddlRegion.Items.Count != 0) { objCommonMIS.RegionSno = ddlRegion.SelectedValue; } else { objCommonMIS.RegionSno = "0"; } objCommonMIS.GetASCBranchs(ddlBranch); if (ddlBranch.Items.Count == 2) { ddlBranch.SelectedIndex = 1; } objCommonMIS.BranchSno = ddlBranch.SelectedValue; objCommonMIS.GetSCs(DDlAsc); if (DDlAsc.Items.Count == 2) { DDlAsc.SelectedIndex = 1; } objCommonMIS.GetASCProductDivisions(ddlProductDivison); } else { objCommonMIS.GetUserRegionsMTS_MTO(ddlRegion); if (ddlRegion.Items.Count == 2) { ddlRegion.SelectedIndex = 1; } if (ddlRegion.Items.Count != 0) { objCommonMIS.RegionSno = ddlRegion.SelectedValue; } else { objCommonMIS.RegionSno = "0"; } objCommonMIS.GetUserBranchs(ddlBranch); if (ddlBranch.Items.Count == 2) { ddlBranch.SelectedIndex = 1; } objCommonMIS.BranchSno = ddlBranch.SelectedValue; objCommonMIS.GetUserSCs(DDlAsc); if (DDlAsc.Items.Count == 2) { DDlAsc.SelectedIndex = 1; } } } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); } catch (Exception ex) { SIMSCommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString()); } }