protected void DropDownList_UVend_Country_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                string d = DropDownList_UVend_Country.Text;
                customer_registration_entity customer = new customer_registration_entity();
                customer_registration_bal    cust_bal = new customer_registration_bal();
                customer.Country_name = d;
                DataSet ds = cust_bal.populate_state_bl(customer);
                DropDownList_UVend_State.DataSource     = ds;
                DropDownList_UVend_State.DataTextField  = "state_name";
                DropDownList_UVend_State.DataValueField = "state_name";
                DropDownList_UVend_State.DataBind();
                DropDownList_UVend_State.Items.Insert(0, new ListItem("Select State", "0"));
            }
            catch (Exception)
            {
                // Code that runs when an unhandled error occurs
                Exception exception = Server.GetLastError();

                // Response.Write("<h2>Global Page Error</h2>\n");

                // Response.Write("<p>" + exception.Message + "</p>\n");

                ExceptionClass.LogException(exception);

                Server.Transfer("~/ErrorPage.aspx?message=http " + exception.Message);

                // Clear the error from the server

                Server.ClearError();
            }
        }
        protected void DropDownListVendor_id_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                obj1.Vendor_id = DropDownListVendor_id.SelectedValue;

                SqlDataReader rd1 = obj2.insert1(obj1);
                if (rd1.HasRows)
                {
                    rd1.Read();
                    Company_Registration_Number1 = (rd1["Company_Registration_Number"].ToString());
                    Vendor_Type1                 = (rd1["Vendor_Type"].ToString());
                    Vendor_Name1                 = (rd1["Vendor_Name"].ToString());
                    Certificate_Name1            = (rd1["Certificate_Name"].ToString());
                    Certificate_Issue_Date1      = (rd1["Certificate_Issue_Date"].ToString());
                    Certificate_Validation_Date1 = (rd1["certificate_validity_date"].ToString());
                    Year_Of_Establishment1       = (rd1["Year_Of_Establishment"].ToString());
                    Country1 = rd1["country_name"].ToString();
                    State1   = rd1["state_name"].ToString();

                    Address1        = (rd1["address_details"].ToString());
                    Contact_Number1 = (rd1["Contact_Number"].ToString());
                    Email_Id1       = (rd1["Email_Id"].ToString());
                    Website1        = (rd1["Website"].ToString());
                    Employee_Count1 = (rd1["employees_count"].ToString());
                    Customer_Count1 = (rd1["customer_count"].ToString());
                }


                c_r_n.Text            = Company_Registration_Number1;
                vendor_type.Text      = Vendor_Type1;
                vendor_name.Text      = Vendor_Name1;
                certificate_name.Text = Certificate_Name1;
                c_i_d.Text            = Certificate_Issue_Date1;
                c_v_d.Text            = Certificate_Validation_Date1;
                yoe.Text = Year_Of_Establishment1;

                DropDownList_UVend_Country.SelectedIndex = DropDownList_UVend_Country.Items.IndexOf(DropDownList_UVend_Country.Items.FindByValue(Country1));
                {
                    string d = DropDownList_UVend_Country.Text;
                    customer_registration_entity customer = new customer_registration_entity();
                    customer_registration_bal    cust_bal = new customer_registration_bal();
                    customer.Country_name = d;
                    DataSet ds = cust_bal.populate_state_bl(customer);
                    DropDownList_UVend_State.DataSource     = ds;
                    DropDownList_UVend_State.DataTextField  = "state_name";
                    DropDownList_UVend_State.DataValueField = "state_name";
                    DropDownList_UVend_State.DataBind();
                    DropDownList_UVend_State.Items.Insert(0, new ListItem("Select State", "0"));
                }
                DropDownList_UVend_State.SelectedIndex = DropDownList_UVend_State.Items.IndexOf(DropDownList_UVend_State.Items.FindByValue(State1));
                address.Text                  = Address1;
                contact_number.Text           = Contact_Number1;
                email_id.Text                 = Email_Id1;
                website.Text                  = Website1;
                emp_count.Text                = Employee_Count1;
                cust_count.Text               = Customer_Count1;
                DropDownListVendor_id.Enabled = false;
            }
            catch (Exception)
            {
                // Code that runs when an unhandled error occurs
                Exception exception = Server.GetLastError();

                // Response.Write("<h2>Global Page Error</h2>\n");

                // Response.Write("<p>" + exception.Message + "</p>\n");

                ExceptionClass.LogException(exception);

                Server.Transfer("~/ErrorPage.aspx?message=http " + exception.Message);

                // Clear the error from the server

                Server.ClearError();
            }
        }