public void BindCustCategory()
 {
     DDLCC.DataSource = CustCategory.GetCustomerCategoryMaster("adminCCM");
     DDLCC.DataBind();
     DDLCC.Items.Insert(0, new ListItem("--Select Category--", "0"));
     DDLCC.Enabled = true;
 }
Ejemplo n.º 2
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;
     }
 }
Ejemplo n.º 3
0
 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"));
 }
Ejemplo n.º 4
0
        public ActionResult DeleteConfirmed(int id)
        {
            CustCategory custCategory = db.CustCategories.Find(id);

            db.CustCategories.Remove(custCategory);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 5
0
    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();
        }
    }
Ejemplo n.º 6
0
 public ActionResult Edit([Bind(Include = "Id,Name,iconPath")] CustCategory custCategory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(custCategory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(custCategory));
 }
Ejemplo n.º 7
0
        public ActionResult Create([Bind(Include = "Id,Name,iconPath")] CustCategory custCategory)
        {
            if (ModelState.IsValid)
            {
                db.CustCategories.Add(custCategory);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(custCategory));
        }
Ejemplo n.º 8
0
        // GET: CustCategories/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CustCategory custCategory = db.CustCategories.Find(id);

            if (custCategory == null)
            {
                return(HttpNotFound());
            }
            return(View(custCategory));
        }
Ejemplo n.º 9
0
    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 btnSave_Click(object sender, EventArgs e)
    {
        string Dmcode = txtCCmcode.Text.Trim().Split(Constants.splitseperator)[0].ToString().Trim();

        CustCategory _objDs = new CustCategory();

        _objDs.CMID      = Convert.ToInt32(lblCMID.Text);
        _objDs.CDMCode   = txtCCmcode.Text.Trim();
        _objDs.CParentID = Convert.ToInt32(DDLCategory.SelectedValue.ToString());
        _objDs.CName     = txtName.Text.Trim();
        _objDs.CIsActive = ChekActive.Checked;
        try
        {
            if (txtCCmcode.Text != "")
            {
                _objDs.CSave();
            }
            MessageBox(Constants.save);

            if (btnSave.Text == "Update")
            {
                BindGvCustomerSCDetail();
                txtCCmcode.Text           = "";
                txtName.Text              = "";
                ChekActive.Checked        = false;
                DDLCategory.SelectedValue = null;
                PnlAddCSC.Visible         = false;
                PnlCSCDetails.Visible     = true;
                btnSave.Text              = "Save";
            }
            else
            {
                BindGvCustomerSCDetail();
                txtCCmcode.Text           = "";
                txtName.Text              = "";
                ChekActive.Checked        = false;
                DDLCategory.SelectedValue = null;
                PnlAddCSC.Visible         = true;
                PnlCSCDetails.Visible     = false;
            }
        }
        catch
        {
        }
    }
    protected void DDLCC_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (DDLCC.SelectedValue != "0")
        {
            DDLCSC.DataSource = CustCategory.GetCustomerCategoryMaster(Convert.ToString(DDLCC.SelectedValue));
            DDLCSC.DataBind();
            DDLCSC.Items.Insert(0, new ListItem("Select Sub Category", "0"));



            if (DDLCSC.Items.Count > 0)
            {
                DDLCSC.Focus();
            }
            else
            {
                DDLCSC.Focus();
            }
        }
        else
        {
            DDLCSC.DataBind();
            DDLCSC.Focus();
        }
        if (DDLCC.SelectedValue == "8")
        {
            btnAddAccess.Enabled = true;
            txtBookType.Enabled  = true;
            txtFromQty.Enabled   = true;
            txtToQty.Enabled     = true;
            txtDiscount.Enabled  = true;
        }
        else
        {
            btnAddAccess.Enabled = false;
            txtBookType.Enabled  = false;
            txtFromQty.Enabled   = false;
            txtToQty.Enabled     = false;
            txtDiscount.Enabled  = false;
        }
    }
Ejemplo n.º 12
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        string       CmCode = txtCustCategoryCode.Text.Trim().Split(Constants.splitseperator)[0].ToString().Trim();
        CustCategory _objDs = new CustCategory();

        _objDs.CMID      = Convert.ToInt32(lblCmID.Text);
        _objDs.CDMCode   = txtCustCategoryCode.Text.Trim();
        _objDs.CName     = txtCustCategoryName.Text.Trim();
        _objDs.CIsActive = ChekActive.Checked;
        try
        {
            if (txtCustCategoryName.Text != "")
            {
                _objDs.CSave();
            }
            MessageBox("Record saved successfully");
            if (btnSave.Text == "Update")
            {
                BindGvCCDetail();
                PnlAddCC.Visible         = false;
                PnlCCDetails.Visible     = true;
                btnSave.Text             = "Save";
                txtCustCategoryCode.Text = "";
                txtCustCategoryName.Text = "";
            }
            else
            {
                BindGvCCDetail();
                txtCustCategoryCode.Text = "";
                txtCustCategoryName.Text = "";
                ChekActive.Checked       = false;
                PnlAddCC.Visible         = true;
                PnlCCDetails.Visible     = false;
            }
        }
        catch
        {
        }
    }
Ejemplo n.º 13
0
 protected void DDLCC_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLCC.SelectedValue != "0")
     {
         DDLCSC.DataSource = CustCategory.GetCustomerCategoryMaster(Convert.ToString(DDLCC.SelectedValue));
         DDLCSC.DataBind();
         DDLCSC.Items.Insert(0, new ListItem("Select Sub Category", "0"));
         if (DDLCSC.Items.Count > 0)
         {
             DDLCSC.Focus();
         }
         else
         {
             DDLCSC.Focus();
         }
     }
     else
     {
         DDLCSC.DataBind();
         DDLCSC.Focus();
     }
 }
Ejemplo n.º 14
0
    protected void GrdCCDetails_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        CustCategory _objDs2 = new CustCategory();

        _objDs2.CMID    = Convert.ToInt32(((Label)GrdCCDetails.Rows[e.RowIndex].FindControl("lblCMID")).Text);
        _objDs2.CDMCode = ((Label)GrdCCDetails.Rows[e.RowIndex].FindControl("lblCMCode")).Text;
        _objDs2.CName   = ((Label)GrdCCDetails.Rows[e.RowIndex].FindControl("lblCCName")).Text;

        _objDs2.CIsActive  = Convert.ToBoolean(false);
        _objDs2.CIsDeleted = Convert.ToBoolean(true);
        try
        {
            _objDs2.CSave();
            MessageBox("Your record is Deleted");
            BindGvCCDetail();

            PnlCCDetails.Visible = true;
            PnlAddCC.Visible     = false;
        }
        catch
        {
        }
    }
    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
        {
        }
    }
Ejemplo n.º 16
0
 public void BindGvCCDetail()
 {
     GrdCCDetails.DataSource = CustCategory.GetCustomerCategoryMaster("adminCCM");
     GrdCCDetails.DataBind();
 }
Ejemplo n.º 17
0
        // GET: Customers
        public ActionResult Index()
        {
            var    customerList = db.Customers.ToList();
            string category;
            string companyName;


            List <CustomerDetails> customerDetailList = new List <CustomerDetails>();

            foreach (var customer in customerList)
            {
                CustCategory custcategory  = new CustCategory();
                CustCat      custcat       = new CustCat();
                CustEntity   companyEntity = new CustEntity();
                CustEntMain  company       = new CustEntMain();

                try
                {
                    custcat      = db.CustCats.Where(c => c.CustomerId == customer.Id).FirstOrDefault();
                    custcategory = db.CustCategories.Where(cat => cat.Id == custcat.CustCategoryId).FirstOrDefault();
                }
                catch (Exception ex)
                {
                    custcategory = new CustCategory
                    {
                        Id       = 0,
                        Name     = "Not Assigned",
                        iconPath = "Images/Customers/Category/unavailable-40.png"
                    };
                }

                try
                {
                    companyEntity = db.CustEntities.Where(ce => ce.CustomerId == customer.Id).FirstOrDefault();
                    company       = db.CustEntMains.Where(co => co.Id == companyEntity.CustEntMainId).FirstOrDefault();
                }
                catch (Exception ex)
                {
                    company = new CustEntMain
                    {
                        Id       = 0,
                        Name     = "Not Assigned",
                        Address  = "none",
                        Contact1 = "0",
                        Contact2 = "0",
                        iconPath = "Images/Customers/Category/unavailable-40.png"
                    };
                }


                customerDetailList.Add(new CustomerDetails
                {
                    Id               = customer.Id,
                    Name             = customer.Name,
                    Email            = customer.Email,
                    Contact1         = customer.Contact1,
                    Contact2         = customer.Contact2,
                    Remarks          = customer.Remarks,
                    Status           = customer.Status,
                    JobID            = customer.JobMains.Count(),
                    CustCategoryID   = custcategory.Id,
                    CustCategoryIcon = custcategory.iconPath,
                    CustEntID        = company.Id,
                    CustEntName      = company.Name,
                    CustEntIconPath  = "~/Images/Customers/Company/organization-40.png",
                    categories       = getCategoriesList(customer.Id),
                    companies        = getCompanyList(customer.Id)

                                       // JobID = db.JobMains.Where(jm => jm.CustomerId.Equals(customer.Id)).FirstOrDefault() == null ? 0 : db.JobMains.Where(jm => jm.CustomerId.Equals(customer.Id)).FirstOrDefault().Id,

                                       //end
                });
            }


            //return View(db.Customers.ToList());
            return(View(customerDetailList));
        }
Ejemplo n.º 18
0
    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)
        {
        }
    }