protected void Page_Load(object sender, EventArgs e) { objCommonMIS.EmpId = User.Identity.Name; if (!Page.IsPostBack) { if (User.IsInRole("EIC")) { objCommonMIS.GetUserRegion(ddlRegion); if (ddlRegion.Items.Count == 2) { ddlRegion.SelectedIndex = 1; } objCommonMIS.RegionSno = ddlRegion.SelectedValue; objCommonMIS.GetUserBranchs(ddlBranch); if (ddlBranch.Items.Count == 2) { ddlBranch.SelectedIndex = 1; objCommonMIS.BranchSno = ddlBranch.SelectedValue; objCommonMIS.GetUserSCs(DDlAsc); } } if (User.IsInRole("SC")) { objCommonMIS.GetASCRegions(ddlRegion); if (ddlRegion.Items.Count == 2) { ddlRegion.SelectedIndex = 1; } objCommonMIS.RegionSno = ddlRegion.SelectedValue; objCommonMIS.GetASCBranchs(ddlBranch); if (ddlBranch.Items.Count == 2) { ddlBranch.SelectedIndex = 1; } objCommonMIS.BranchSno = ddlBranch.SelectedValue; objCommonMIS.GetSCs(DDlAsc); } TimeSpan duration = new TimeSpan(0, 0, 0, 0); txtFromDate.Text = DateTime.Now.AddDays(1 - DateTime.Now.Day).Add(duration).ToShortDateString(); txtToDate.Text = DateTime.Now.Add(duration).ToShortDateString(); } }
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) { 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; } objSpareConsumption.ASC_Id = 0; objSpareConsumption.BindProductDivisionData(ddlProductDivison); } objSpareConsumption.ProductDivision_Id = 0; ViewState["Column"] = "Spare_id"; ViewState["Order"] = "ASC"; } 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) { objCommonMIS.EmpId = Membership.GetUser().UserName.ToString(); objCommonMIS.BusinessLine_Sno = "2"; if (!IsPostBack) { txtFromDate.Text = DateTime.Now.ToShortDateString(); txtToDate.Text = DateTime.Now.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; } } 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; } } objCommonMIS.GetUserProductDivisions(ddlProductDiv); BindgvConfirmation(); } }
protected void Page_Load(object sender, EventArgs e) { try { objCommonMIS.EmpId = Membership.GetUser().UserName.ToString(); objCommonMIS.BusinessLine_Sno = "2"; if (!Page.IsPostBack) { 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; } objRejectedClaim.ASC_Id = 0; objRejectedClaim.BindProductDivisionData(ddlProductDivison); } ViewState["Column"] = "Region"; ViewState["Order"] = "ASC"; } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); } catch (Exception ex) { CommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString()); } FillASCDropDownToolTip(); FillRegionDropDownToolTip(); FillBranchDropDownToolTip(); FillDivisionDropDownToolTip(); }