private void Country()
        {
            ddlCountry.Items.Clear();
            con.Open();
            SqlCommand Show = new SqlCommand();

            Show.Connection  = con;
            Show.CommandText = @"select ID, Name from Country order by Name";
            SqlDataReader DATA;

            DATA = Show.ExecuteReader();
            ddlCountry.Items.Add(new ListItem("Select Country", "0"));
            while (DATA.Read())
            {
                ListItem new_Item = new ListItem();
                new_Item.Text  = DATA["Name"].ToString();
                new_Item.Value = DATA["ID"].ToString();
                ddlCountry.Items.Add(new_Item);
            }
            con.Close();
        }
Example #2
0
        private void Upazila(int ID)
        {
            ddlUpazila.Items.Clear();
            con.Open();
            SqlCommand Show = new SqlCommand();

            Show.Connection  = con;
            Show.CommandText = @"select ID, Name from Upazila where LinkID=" + ID + " order by Name";
            SqlDataReader DATA;

            DATA = Show.ExecuteReader();
            ddlUpazila.Items.Add(new ListItem("Select Upazila", "0"));
            while (DATA.Read())
            {
                ListItem new_Item = new ListItem();
                new_Item.Text  = DATA["Name"].ToString();
                new_Item.Value = DATA["ID"].ToString();
                ddlUpazila.Items.Add(new_Item);
            }
            con.Close();
        }
Example #3
0
        private void DocotorCatagoris()
        {
            ddlDoctorCatagoris.Items.Clear();
            con.Open();
            SqlCommand Show = new SqlCommand();

            Show.Connection  = con;
            Show.CommandText = @"select ID, Catagoris from DoctorCatagoris order by Catagoris";
            SqlDataReader DATA;

            DATA = Show.ExecuteReader();
            ddlDoctorCatagoris.Items.Add(new ListItem("Doctor Categories", "0"));
            while (DATA.Read())
            {
                ListItem new_Item = new ListItem();
                new_Item.Text  = DATA["Catagoris"].ToString();
                new_Item.Value = DATA["Catagoris"].ToString();
                ddlDoctorCatagoris.Items.Add(new_Item);
            }
            con.Close();
        }