public void Bind_DDL_CC() { DDLCC.DataSource = CustCategory.GetCustomerCategoryMaster("adminCCM"); DDLCC.DataBind(); DDLCC.Items.Insert(0, new ListItem("-Select Customer Category-", "0")); DDLSuperZone.Items.Insert(0, new ListItem("-Select SuperZone-", "0")); }
protected void RdbtnSelect1_SelectedIndexChanged(object sender, EventArgs e) { if (RdbtnSelect1.SelectedValue == "Summary") { Pnl2.Visible = true; Pnl1.Visible = false; Response.Redirect(Request.RawUrl); } if (RdbtnSelect1.SelectedValue == "Details") { Pnl2.Visible = false; Pnl1.Visible = true; DDLSuperZone.Focus(); DDLSuperZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(0, "SuperZone"); DDLSuperZone.DataBind(); DDLSuperZone.Items.Insert(0, new ListItem("-Select Super Zone-", "0")); getDDLdata(); txtfromDate.Text = Session["FromDate"].ToString(); txtToDate.Text = Session["ToDate"].ToString(); DDLCC.DataSource = CustCategory.GetCustomerCategoryMaster("adminCCM"); DDLCC.DataBind(); DDLCC.Items.Insert(0, new ListItem("--Select Category--", "0")); DDLCC.Enabled = true; } }
public void BindCustCategory() { DDLCC.DataSource = Others.CustCategory.GetCustomerCategoryMaster("adminCCM"); DDLCC.DataBind(); DDLCC.Items.Insert(0, new ListItem("All Category", "0")); DDLCC.Enabled = true; }
protected void Page_Load(object sender, EventArgs e) { if (ConfigurationManager.AppSettings["access"].ToString() != ConfigurationManager.AppSettings["accessok"].ToString()) { string page = Request.Url.Segments[Request.Url.Segments.Length - 1].ToString(); if (Session["Role"] != null) { if (!Other.Get_UserAccess(page, Session["Role"].ToString())) { Response.Redirect("dashboard.aspx"); } } } if (Session["ChetanaCompanyName"] != "") { if (Session["FY"] != "") { strChetanaCompanyName = Session["ChetanaCompanyName"].ToString(); strFY = Session["FY"].ToString(); } else { Session.Clear(); } } if (!Page.IsPostBack) { Session["salesanalysis"] = null; ddlSDZone.Focus(); ddlSDZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(0, "SDZone"); ddlSDZone.DataBind(); ddlSDZone.Items.Insert(0, new ListItem("-Select Super Duper Zone-", "0")); DDLSuperZone.Items.Insert(0, new ListItem("-Select Super Zone-", "0")); DDLCC.DataSource = CustCategory.GetCustomerCategoryMaster("adminCCM"); DDLCC.DataBind(); DDLCC.Items.Insert(0, new ListItem("--Select Category--", "0")); DDLCC.Enabled = true; } if (IsPostBack) { if (txtfromDate.Text != "" || txtToDate.Text != "") { ShowDetails("session"); } else if (txtToDate.Text == "") { } else { // ShowDetails(); } txtfromDate.Text = Session["FromDate"].ToString(); txtToDate.Text = Session["ToDate"].ToString(); } }
protected void DDLCC_SelectedIndexChanged(object sender, EventArgs e) { if (DDLCC.SelectedIndex == 0) { DDLCC.Focus(); DDLSuperZone.Items.Clear(); Bind_DDL_CC(); } else { Bind_DDL_SuperZone(); DDLSuperZone.Focus(); } }
private void fillzones() { DDLsuperzone.DataSource = SuperZone.GetSuperzonemaster(); DDLsuperzone.DataBind(); DDLsuperzone.Items.Insert(0, new ListItem("--Select SuperZone--", "0")); ddLStates.DataSource = Destination.GetDestination(flag); ddLStates.DataBind(); ddLStates.Items.Insert(0, new ListItem("--Select State--", "0")); ddlCity.Items.Insert(0, new ListItem("--Select City--", "0")); DDLCC.DataSource = CustCategory.GetCustomerCategoryMaster(flag); DDLCC.DataBind(); DDLCC.Items.Insert(0, new ListItem("--Select Category--", "0")); DDLCSC.Items.Insert(0, new ListItem("--Select Sub Category--", "0")); }
protected void grdCustDetails_RowEditing(object sender, GridViewEditEventArgs e) { try { DDLareazone.Enabled = true; DDLarea.Enabled = true; DDLzone.Enabled = true; btnSave.Visible = true; btnSave.Text = "Update"; filter.Visible = false; btnSave.Enabled = true; PnlDetails.Visible = false; PnlAdd.Visible = true; repAlfabets.Visible = false; TxtCustCode.Enabled = false; LblCustId.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblCustID")).Text; TxtCustCode.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblCustCode")).Text; TxtShortForm.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblShortForm")).Text; TxtFamilyCode.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblFamilyCode")).Text; TxtAddress.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblAddress")).Text; TxtZip.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblZip")).Text; TxtPhone1.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblPhone1")).Text; TxtPhone2.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblPhone2")).Text; TxtEmailID.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblEmailID")).Text; TxtCustName.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblCustName")).Text; TxtCreditLimit.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblCreditLimit")).Text; TxtPrincipalName.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("LblPrincipalName")).Text; TxtPrincipalMobile.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("LblPrincipalMobile")).Text; TxtPrincipalDOB.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("LblPrincipalDOB")).Text; TxtKeyPersonName.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("LblKeyPersonName")).Text; TxtKeyPersonMobile.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("LblKeyPersonMobile")).Text; TxtKeyPersonDOB.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("LblKeyPersonDOB")).Text; TxtAdditinalDis.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("LblAdditinalDis")).Text; TxtVIPRemark.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("LblVIPRemark")).Text; TxtMedium.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("LblMedium")).Text; ChkIsActive.Checked = ((CheckBox)grdCustDetails.Rows[e.NewEditIndex].FindControl("chkisActive")).Checked; LblSuperzone.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("LblSuperZoneID")).Text; Lblzone.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("LblZoneID")).Text; LblAreazone.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("LblAreaZoneID")).Text; LblArea.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("LblAreaID")).Text; LblCustDetailID1.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("LblCustDetailID")).Text; TxtCustomerType.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblctype")).Text; txtcreditdays.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblcreditdays")).Text; lblrating.Text = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblcustrating")).Text; try { DDLsuperzone.SelectedValue = LblSuperzone.Text.Trim(); DDLzone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(LblSuperzone.Text), "Zone"); DDLzone.DataBind(); DDLzone.Items.Insert(0, new ListItem("--Select Zone--", "0")); DDLzone.SelectedValue = Lblzone.Text.Trim(); DDLareazone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(Lblzone.Text), "AreaZone"); DDLareazone.DataBind(); DDLareazone.Items.Insert(0, new ListItem("--Select AreaZone--", "0")); DDLareazone.SelectedValue = LblAreazone.Text.Trim(); DDLarea.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(LblAreazone.Text), "Area"); DDLarea.DataBind(); DDLarea.Items.Insert(0, new ListItem("--Select Area--", "0")); DDLarea.SelectedValue = LblArea.Text.Trim(); } catch { } ddLStates.DataSource = Destination.GetDestination(flag); ddLStates.DataBind(); ddLStates.Items.Insert(0, new ListItem("--Select State--", "0")); ddLStates.SelectedValue = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblstate1")).Text.Trim(); ddlCity.DataSource = Destination.GetDestination(Convert.ToString(ddLStates.SelectedValue)); ddlCity.DataBind(); ddlCity.Items.Insert(0, new ListItem("--Select City--", "0")); ddlCity.SelectedValue = ((Label)grdCustDetails.Rows[e.NewEditIndex].FindControl("lblCity")).Text.Trim(); DataView dv1 = new DataView(Masterofmaster.Get_MasterOfMaster_ByGroup("CustRating").Tables[0]); DdlCustRating.DataSource = dv1; DdlCustRating.DataBind(); DdlCustRating.Items.Insert(0, new ListItem("--Select Rating--", "0")); DdlCustRating.SelectedValue = lblrating.Text.Trim(); DDLCC.DataSource = CustCategory.GetCustomerCategoryMaster("adminCCM"); DDLCC.DataBind(); DDLCC.Items.Insert(0, new ListItem("--Select Category--", "0")); DDLCC.SelectedValue = ((Label)grdCustDetails.Rows[0].FindControl("lblCMID")).Text.Trim(); DDLCSC.DataSource = CustCategory.GetCustomerCategoryMaster("adminSubCCM"); DDLCSC.DataBind(); DDLCSC.Items.Insert(0, new ListItem("--Select Sub Category--", "0")); DDLCSC.SelectedValue = ((Label)grdCustDetails.Rows[0].FindControl("lblCMIDSUB")).Text.Trim(); } catch { } }
public void FillForm() { try { //DDLareazone.Enabled = true; //DDLarea.Enabled = true; //DDLzone.Enabled = true; //btnSave.Visible = true; PnlAdd.Visible = true; //PnlAdd.Enabled= false; //btnSave.Text = "Update"; //btnSave.Enabled = true; LblCustId.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblCustID")).Text; TxtCustCode.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblCustCode")).Text; TxtShortForm.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblShortForm")).Text; TxtFamilyCode.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblFamilyCode")).Text; TxtAddress.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblAddress")).Text; TxtZip.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblZip")).Text; TxtPhone1.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblPhone1")).Text; TxtPhone2.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblPhone2")).Text; TxtEmailID.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblEmailID")).Text; TxtCustName.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblCustName")).Text; TxtCreditLimit.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblCreditLimit")).Text; TxtPrincipalName.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblPrincipalName")).Text; TxtPrincipalMobile.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblPrincipalMobile")).Text; TxtPrincipalDOB.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblPrincipalDOB")).Text; TxtKeyPersonName.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblKeyPersonName")).Text; TxtKeyPersonMobile.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblKeyPersonMobile")).Text; TxtKeyPersonDOB.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblKeyPersonDOB")).Text; TxtAdditinalDis.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblAdditinalDis")).Text; TxtVIPRemark.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblVIPRemark")).Text; TxtMedium.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblMedium")).Text; ChkIsActive.Checked = ((CheckBox)grdCustDetails.Rows[0].FindControl("chkisActive")).Checked; LblSuperzone.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblSuperZoneID")).Text; Lblzone.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblZoneID")).Text; LblAreazone.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblAreaZoneID")).Text; LblArea.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblAreaID")).Text; LblCustDetailID1.Text = ((Label)grdCustDetails.Rows[0].FindControl("LblCustDetailID")).Text; TxtCustomerType.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblctype")).Text; txtcreditdays.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblcreditdays")).Text; lblrating.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblcustrating")).Text; txtSchAdditionalDis.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblSchAdditionalDis")).Text; txtTODValue1.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblTODValue1")).Text; txtTODValue2.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblTODValue2")).Text; txtTODValue3.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblTODValue3")).Text; txtTODDisc1.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblTODDisc1")).Text; txtTODDisc2.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblTODDisc2")).Text; txtTODDisc3.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblTODDisc3")).Text; TxtblkRemark.Text = ((Label)grdCustDetails.Rows[0].FindControl("Lblblkremark")).Text; TxtblkDate.Text = ((Label)grdCustDetails.Rows[0].FindControl("Lblblkdate")).Text; txtUpperlimit.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblCUL")).Text; txtLowerlimit.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblCLL")).Text; chk_splitdc.Checked = ((CheckBox)grdCustDetails.Rows[0].FindControl("chk_isSplit")).Checked; //ReadMe Comment(Zaid Ansari) Any Problem SBUCode Dropdown Bind Find This Method GetSBUCode() lblSBUCodeNone.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblSUBCode")).Text == "" ? "0" : lblSBUCodeNone.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblSUBCode")).Text; txtPANNo.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblPan")).Text; txtGst.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblGst")).Text; txtStateCode.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblStateCode")).Text; try { //ReadMe Comment(Zaid Ansari)(Dropdown Bind) Super Zone ,State,City,Category Any Problem Find This Method fillzones() ddlSbucode.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown("SBU", "DropDown"); ddlSbucode.DataBind(); ddlSbucode.Items.Insert(0, new ListItem("--Seelct SBU Code--", "0")); ddlSbucode.SelectedValue = lblSBUCodeNone.Text; DDLsuperzone.SelectedValue = LblSuperzone.Text; DDLzone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(LblSuperzone.Text), "Zone"); DDLzone.DataBind(); DDLzone.Items.Insert(0, new ListItem("--Select Zone--", "0")); DDLzone.SelectedValue = Lblzone.Text.Trim(); DDLareazone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(Lblzone.Text), "AreaZone"); DDLareazone.DataBind(); DDLareazone.Items.Insert(0, new ListItem("--Select AreaZone--", "0")); DDLareazone.SelectedValue = LblAreazone.Text.Trim(); DDLarea.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(LblAreazone.Text), "Area"); DDLarea.DataBind(); DDLarea.Items.Insert(0, new ListItem("--Select Area--", "0")); DDLarea.SelectedValue = LblArea.Text.Trim(); } catch { } ddLStates.DataSource = Destination.GetDestination(flag); ddLStates.DataBind(); ddLStates.Items.Insert(0, new ListItem("--Select State--", "0")); ddLStates.SelectedValue = ((Label)grdCustDetails.Rows[0].FindControl("lblstate1")).Text.Trim(); ddlCity.DataSource = Destination.GetDestination(Convert.ToString(ddLStates.SelectedValue)); ddlCity.DataBind(); ddlCity.Items.Insert(0, new ListItem("--Select City--", "0")); ddlCity.SelectedValue = ((Label)grdCustDetails.Rows[0].FindControl("lblCity")).Text.Trim(); DataView dv1 = new DataView(Masterofmaster.Get_MasterOfMaster_ByGroup("CustRating").Tables[0]); DdlCustRating.DataSource = dv1; DdlCustRating.DataBind(); DdlCustRating.Items.Insert(0, new ListItem("--Select Rating--", "0")); DdlCustRating.SelectedValue = lblrating.Text.Trim(); ChkBlacklist.Checked = ((CheckBox)grdCustDetails.Rows[0].FindControl("ChKBList")).Checked; //lblboardid.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblboardid")).Text; //DDLBoard.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup("Board").Tables[0]; //DDLBoard.DataBind(); //DDLBoard.Items.Insert(0, new ListItem("--Select Board--", "0")); //DDLBoard.SelectedValue = ((Label)grdCustDetails.Rows[0].FindControl("lblboardid")).Text; txtassociation.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblassociation")).Text; txtcgp.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblcgp")).Text; txtbuisiness.Text = ((Label)grdCustDetails.Rows[0].FindControl("lblbuisiness")).Text; DDLCC.DataSource = CustCategory.GetCustomerCategoryMaster(flag); DDLCC.DataBind(); DDLCC.Items.Insert(0, new ListItem("--Select Category--", "0")); DDLCC.SelectedValue = ((Label)grdCustDetails.Rows[0].FindControl("lblCMID")).Text.Trim(); DDLCSC.DataSource = CustCategory.GetCustomerCategoryMaster(Convert.ToString(DDLCC.SelectedValue)); DDLCSC.DataBind(); DDLCSC.Items.Insert(0, new ListItem("--Select City--", "0")); DDLCSC.SelectedValue = ((Label)grdCustDetails.Rows[0].FindControl("lblCMIDSUB")).Text.Trim(); } catch (Exception ex) { } }