Ejemplo n.º 1
0
 private void union_no_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13)
     {
         try
         {
             Union u = new Union();
             unionbox.Text = u.getUnionName(u.generateUnionID( Convert.ToInt32(district_no.Text), Convert.ToInt32(thana_no.Text),Convert.ToInt32(union_no.Text)));
             cncbox.Select();
         }
         catch (Exception ex) { MessageBox.Show(ex.ToString()); }
     }
 }
Ejemplo n.º 2
0
        private void thana_no_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == 13)
            {
                try
                {
                    Thana t = new Thana();
                    thanabox.Text = t.getThanaName(t.generateThanaID(Convert.ToInt32(district_no.Text), Convert.ToInt32(thana_no.Text)));
                    Union u = new Union();
                    unionbox.DataSource = u.getUnionList(t.generateThanaID(Convert.ToInt32(district_no.Text), Convert.ToInt32(thana_no.Text)));
                    union_no.Select();

                }
                catch (Exception ex) {MessageBox.Show(ex.ToString()); }

            }
        }
Ejemplo n.º 3
0
        private void unionbox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Union u = new Union();
            String thanaid = "D" + district_no.Text + "T" + thana_no.Text + "";
            //Village v = new Village ();
            try
            {
                union_no.Text = u.getUnionNo(unionbox.Text, thanaid).ToString();
                cncbox.Select();

            }
            catch (Exception ex) { }
        }
Ejemplo n.º 4
0
        private void thanabox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Union u = new Union();
            Thana t = new Thana();
            District d = new District ();

            try
            {

                thana_no.Text = t.getThanaNo(thanabox.Text.ToString(), Convert.ToInt32(district_no.Text.ToString())).ToString();
                String thanaid = "D" + district_no.Text + "T" + thana_no.Text + "";
                unionbox.DataSource = u.getUnionList(thanaid);
                unionbox.SelectedIndex = -1;
                unionbox.Select();
            }
            catch (Exception ex) { }
        }