/// <summary>
        /// This method is used to update the data with the help of ProCustomerUpdateAll stored procedure.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSubmit_Click(object sender, System.EventArgs e)
        {
            try
            {
                DBUtil dbobj1 = new DBUtil(System.Configuration.ConfigurationSettings.AppSettings["Servosms"], true);
                //InventoryClass obj1=new InventoryClass ();
                //SqlDataReader SqlDtr1=null;
                SqlDataReader rdr1       = null;
                int           Total_Cust = 0;
                //string prod_cat="",sql;
                //int flag = 0;
                //string j="";
                //int x=0;
                PartiesClass obj = new PartiesClass();
                Total_Cust = System.Convert.ToInt32(Request.Params.Get("Total_Cust"));
                int i = 0;
                for (int j = 0; j < Total_Cust; j++)
                {
                    i               = 0;
                    obj.Cust_ID     = Request.Params.Get("txtInfo" + j + "To" + i++);
                    obj.sadbhavnacd = Request.Params.Get("txtInfo" + j + "To" + i++);
                    obj.Cust_Name   = Request.Params.Get("txtInfo" + j + "To" + i++);
                    obj.Address     = Request.Params.Get("txtInfo" + j + "To" + i++);
                    //obj.EMail=Request.Params.Get("txtInfo"+j+"To"+i++);
                    string type = Request.Params.Get("txtInfo" + j + "To" + i++);
                    if (type != "Select")
                    {
                        obj.Cust_Type = type;
                    }
                    else
                    {
                        obj.Cust_Type = "";
                    }
                    string ssr = Request.Params.Get("txtInfo" + j + "To" + i++);
                    if (ssr == "Select")
                    {
                        obj.SSR = "";
                    }
                    else
                    {
                        dbobj1.SelectQuery("select Emp_ID from Employee where Emp_Name='" + ssr + "'", ref rdr1);
                        if (rdr1.Read())
                        {
                            obj.SSR = rdr1["Emp_ID"].ToString();
                        }
                        else
                        {
                            obj.SSR = "";
                        }
                        rdr1.Close();
                    }
                    //obj.SSR=Request.Params.Get("txtInfo"+j+"To"+i++);
                    string city = Request.Params.Get("txtInfo" + j + "To" + i++);
                    if (city != "Select")
                    {
                        obj.City = city;
                    }
                    else
                    {
                        obj.City = "";
                    }
                    dbobj1.SelectQuery("select state,country from beat_master where city='" + city + "'", ref rdr1);
                    if (rdr1.Read())
                    {
                        obj.State   = rdr1["state"].ToString();
                        obj.Country = rdr1["country"].ToString();
                    }
                    else
                    {
                        obj.State   = "";
                        obj.Country = "";
                    }
                    rdr1.Close();
                    //obj.Op_Balance=Request.Params.Get("txtInfo"+j+"To"+i++);        //Coment by vikas 17.07.09
                    //obj.Balance_Type=Request.Params.Get("txtInfo"+j+"To"+i++);      //Coment by vikas 17.07.09

                    obj.ContactPerson = Request.Params.Get("txtInfo" + j + "To" + i++);                  //Add by vikas 17.07.09

                    obj.Tel_Off      = Request.Params.Get("txtInfo" + j + "To" + i++);
                    obj.Mobile       = Request.Params.Get("txtInfo" + j + "To" + i++);
                    obj.Tin_No       = Request.Params.Get("txtInfo" + j + "To" + i++);
                    obj.CR_Limit     = Request.Params.Get("txtInfo" + j + "To" + i++);
                    obj.CR_Days      = Request.Params.Get("txtInfo" + j + "To" + i++);
                    obj.Op_Balance   = Request.Params.Get("txtInfo" + j + "To" + i++);                  //Add by vikas 17.07.09
                    obj.Balance_Type = Request.Params.Get("txtInfo" + j + "To" + i++);                  //Add by vikas 17.07.09
                    //call the procedure ProCustomerUpdateAll for update the customer data.
                    obj.UpdateCustomerAll();
                }
                if (i > 0)
                {
                    DropSearchBy.SelectedIndex = 0;                            //Add by vikas 17.07.09
                    DropValue.Value            = "All";                        //Add by vikas 17.07.09
                    //Customer balance update after update the customer record.
                    CustomerBalanceUpdation();
                    MessageBox.Show("Customer Updated");
                }
                CreateLogFiles.ErrorLog("Form:CustomerUpdation.aspx,Method:btnSubmit_click(),  Customer Updated Successfully");
            }
            catch (Exception ex)
            {
                CreateLogFiles.ErrorLog("Form:CustomerUpdation.aspx,Method:update().   EXCEPTION " + ex.Message);
                // CreateLogFiles.ErrorLog("Form:stockledgerUpdation.aspx,Method:update().   EXCEPTION " +ex.Message +"  User_ID : "+ Session["User_Name"].ToString());
            }
        }