Exemple #1
0
        protected void btnMerge_Click(object sender, EventArgs e)
        {
            SetValue();
            string res = string.Empty;

            if (hdnNewCustomer.Value == hdnOldCustomer.Value)
            {
                //  Session["ReturnMsg"] = "Both customer are same.";
                lblError.Text = "Both customer are same.";
                return;
            }
            res = BAL.BALFactory.Instance.BL_CustomerMaster.MergeDuplicateCustomer(Ob);
            if (res == "Record Saved")
            {
                //Session["ReturnMsg"] = "Customer merge sucessfully";
                lblMsg.Text               = "Customer merge sucessfully";
                txtCustomerSearch.Text    = "";
                txtDuplicateCustomer.Text = "";
                txtCustomerSearch.Focus();
                GridViewDuplicate.DataSource = null;
                GridViewDuplicate.DataBind();
                grdCustomerSearch.DataSource = null;
                grdCustomerSearch.DataBind();
            }
            else
            {
                lblError.Text = res.ToString();
            }
        }
Exemple #2
0
 protected void txtDuplicateCustomer_TextChanged(object sender, EventArgs e)
 {
     try
     {
         DuplicateCustomer         = txtDuplicateCustomer.Text.Split('-');
         hdnOldCustomer.Value      = DuplicateCustomer[0].ToString();
         txtDuplicateCustomer.Text = DuplicateCustomer[1].ToString();
         btnMerge.ForeColor.GetBrightness();
         btnMerge.Focus();
         GridViewDuplicate.DataSource = null;
         GridViewDuplicate.DataBind();
         GridViewDuplicate.DataSource = BAL.BALFactory.Instance.BL_CustomerMaster.BindGridCustomerSearch(DuplicateCustomer[0].ToString().Trim(), Globals.BranchID);
         GridViewDuplicate.DataBind();
     }
     catch (Exception ex)
     {
         Session["ReturnMsg"] = "Please enter valid customer.";
         txtDuplicateCustomer.Focus();
         txtDuplicateCustomer.Attributes.Add("onfocus", "javascript:select();");
     }
 }