protected void ddlProductDivison_SelectedIndexChanged(object sender, EventArgs e) { try { if (ddlProductDivison.SelectedIndex != 0) { objDefectAnalysisRpt.ProductDivision_Sno = int.Parse(ddlProductDivison.SelectedValue.ToString()); objDefectAnalysisRpt.BindAllProductLineDdl(ddlProductLine); //objDefectAnalysisRpt.BindDefectCatDdl(ddlDefectCategory, Convert.ToInt32(ddlBusinessLine.SelectedValue), Convert.ToInt32(ddlProductDivison.SelectedValue), Convert.ToInt32(ddlProductLine.SelectedValue)); } else { objDefectAnalysisRpt.ProductDivision_Sno = int.Parse(ddlProductDivison.SelectedValue.ToString()); objDefectAnalysisRpt.BindAllProductLineDdl(ddlProductLine); //objDefectAnalysisRpt.BindDefectCatDdl(ddlDefectCategory, Convert.ToInt32(ddlBusinessLine.SelectedValue), Convert.ToInt32(ddlProductDivison.SelectedValue), Convert.ToInt32(ddlProductLine.SelectedValue)); ddlProductLine.Items.Clear(); ddlProductLine.Items.Insert(0, new ListItem("All", "0")); } ddlProductGroup.Items.Clear(); ddlProductGroup.Items.Insert(0, new ListItem("All", "0")); ddlProduct.Items.Clear(); ddlProduct.Items.Insert(0, new ListItem("All", "0")); ddlDefect.Items.Clear(); ddlDefect.Items.Insert(0, new ListItem("All", "0")); ddlDefectCategory.Items.Clear(); ddlDefectCategory.Items.Insert(0, new ListItem("All", "0")); } catch (Exception ex) { CommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { objCommonMIS.EmpId = Membership.GetUser().UserName.ToString(); objCommonMIS.GetUserBusinessLine(ddlBusinessLine); objCommonMIS.BusinessLine_Sno = ddlBusinessLine.SelectedValue; objCommonMIS.GetUserRegionsMTS_MTO(ddlRegion); objCommonMIS.RegionSno = ddlRegion.SelectedValue; objCommonMIS.GetUserBranchs(ddlBranch); ddlBranch.Items.Insert(0, new ListItem("All", "0")); objCommonMIS.BranchSno = ddlBranch.SelectedValue; objCommonMIS.GetUserProductDivisions(ddlProductDivison); ddlProductDivison.Items.Insert(0, new ListItem("Pumps", "16")); ddlProductDivison.SelectedValue = "16"; objDefectAnalysisRpt.ProductDivision_Sno = 16; ddlProductDivison.DataBind(); objDefectAnalysisRpt.BindAllProductLineDdl(ddlProductLine); ddlProductDivison.Enabled = false; //ddlProductLine.Items.Insert(0, new ListItem("All", "0")); txtLoggedDateFrom.Text = DateTime.Today.AddDays(-7).ToString("MM/dd/yyyy"); txtLoggedDateTo.Text = DateTime.Today.AddDays(0).ToString("MM/dd/yyyy"); btnExportExcel.Visible = false; } }
private void BindListBasedOnProductDivision() { try { if (!string.IsNullOrEmpty(ddlProductDivison.SelectedValue)) { objDefectAnalysisRpt.ProductDivision_Sno = int.Parse(ddlProductDivison.SelectedValue.ToString()); objDefectAnalysisRpt.BindAllProductLineDdl(ddlProductLine); } else { ddlProductLine.Items.Clear(); ddlProductGroup.Items.Clear(); ddlProduct.Items.Clear(); ddlDefect.Items.Clear(); ddlDefectCategory.Items.Clear(); } ddlProductGroup.Items.Insert(0, new ListItem("All", "0")); ddlProduct.Items.Insert(0, new ListItem("All", "0")); ddlDefect.Items.Insert(0, new ListItem("All", "0")); ddlDefectCategory.Items.Insert(0, new ListItem("All", "0")); } catch (Exception ex) { } }