Esempio n. 1
0
        private void districtbox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Thana    t = new Thana();
            District d = new District();

            try
            {
                thanabox.DataSource = t.getThanaList(d.getDistrictNo(districtbox.Text.ToString()));
                district_no.Text    = d.getDistrictNo(districtbox.Text.ToString()).ToString();
                thanabox.Select();
            }
            catch (Exception ex) { MessageBox.Show(ex.ToString()); }
        }
Esempio n. 2
0
 private void district_no_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13)
     {
         try
         {
             District d = new District();
             Thana    t = new Thana();
             districtbox.Text    = d.getDistrictName(Convert.ToInt32(district_no.Text));
             thanabox.DataSource = t.getThanaList(d.getDistrictNo(districtbox.Text.ToString()));
             thana_no.Select();
         }
         catch (Exception ex) { MessageBox.Show(ex.ToString()); }
     }
 }