Exemple #1
0
        protected void CancelButton_Click(object sender, EventArgs e)
        {
            /*BranchNameDropDownList.SelectedValue = "";
            *  BranchHeadDropDownList.SelectedValue = "";
            *  MaleRadioButton.Checked = false;
            *  FemaleRadioButton.Checked = false;
            *  OtherRadioButton.Checked = false;
            *  StateDropDownList.SelectedValue = "";
            *  CityDropDownList.SelectedValue = "";
            *  BranchAddressTextBox.Text = "";
            *  DateofBranchRegistrationTextBox.Text = "";
            *  BranchCodeDropDownList.SelectedValue = "";*/


            BranchNameDropDownList.ClearSelection();
            BranchHeadDropDownList.ClearSelection();
            MaleRadioButton.Checked   = false;
            FemaleRadioButton.Checked = false;
            OtherRadioButton.Checked  = false;
            StateDropDownList.ClearSelection();
            CityDropDownList.ClearSelection();
            BranchAddressTextBox.Text            = " ";
            DateofBranchRegistrationTextBox.Text = "";
            BranchCodeDropDownList.ClearSelection();
        }
Exemple #2
0
        protected void StateDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                HRSCustomersBLL customerBLLObject = new HRSCustomersBLL();
                var             cities            = customerBLLObject.GetCity(Convert.ToInt32(StateDropDownList.SelectedItem.Value));
                CityDropDownList.DataSource     = cities;
                CityDropDownList.DataTextField  = "Value";
                CityDropDownList.DataValueField = "Key";
                CityDropDownList.DataBind();
                CityDropDownList.Focus();

                System.Text.StringBuilder sb = new System.Text.StringBuilder();
                sb.Append(@"<script type='text/javascript'>");
                sb.Append("$(function () {");
                sb.Append(" $('#Register').modal('show');});");
                sb.Append("</script>");
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "ModelScript", sb.ToString(), false);
                CityDropDownList.Focus();
            }
            catch (Exception ex)
            {
                Utility.ExceptionUtility.ExceptionLog(ex);
                throw;
            }
        }
Exemple #3
0
        protected void StateDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            string constr = ConfigurationManager.ConnectionStrings["RKCS"].ConnectionString;

            using (SqlConnection con = new SqlConnection(constr))
            {
                con.Open();
                SqlCommand cmd = new SqlCommand("Select CityName,CityId from City where StateId=@sid", con);
                cmd.Parameters.AddWithValue("@sid", StateDropDownList.SelectedValue);
                SqlDataReader dr = cmd.ExecuteReader();
                CityDropDownList.DataSource     = dr;
                CityDropDownList.DataTextField  = "CityName";
                CityDropDownList.DataValueField = "CityId";
                CityDropDownList.DataBind();
            }
        }
Exemple #4
0
 protected void StateDropDownList_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         HRSCustomersBLL customerBLLObject = new HRSCustomersBLL();
         var             cities            = customerBLLObject.GetCity(Convert.ToInt32(StateDropDownList.SelectedItem.Value));
         CityDropDownList.DataSource     = cities;
         CityDropDownList.DataTextField  = "Value";
         CityDropDownList.DataValueField = "Key";
         CityDropDownList.DataBind();
         CityDropDownList.Focus();
     }
     catch (Exception ex)
     {
         Utility.ExceptionUtility.ExceptionLog(ex);
         throw;
     }
 }