Пример #1
0
        public void fLoad( )
        {
            txtSoHoSo.Text               = CTiepNhanDon.IdentityBienNhan();
            cbLoaiTiepNhan.DataSource    = CTiepNhanDon.getLoaiTiepNhan("BB");
            cbLoaiTiepNhan.DisplayMember = "TenLoai";
            cbLoaiTiepNhan.ValueMember   = "ID";

            try
            {
                List <TENDUONG> list = CHeThongDuong.getList();
                foreach (var item in list)
                {
                    namesCollection.Add(item.DUONG);
                }
                txtDuong.AutoCompleteMode         = AutoCompleteMode.Suggest;
                txtDuong.AutoCompleteSource       = AutoCompleteSource.CustomSource;
                txtDuong.AutoCompleteCustomSource = namesCollection;

                this.cbPhuong.DataSource    = CHeThongDuong.getListPhuong();
                this.cbPhuong.DisplayMember = "Display";
                this.cbPhuong.ValueMember   = "Value";

                cbQuan.DataSource    = CHeThongDuong.getListQUAN();
                cbQuan.DisplayMember = "Display";
                cbQuan.ValueMember   = "Value";
            }
            catch (Exception)
            {
            }
        }
Пример #2
0
 private void cbQuan_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         this.cbPhuong.DataSource    = CHeThongDuong.getListPhuong(int.Parse(cbQuan.SelectedValue.ToString()));
         this.cbPhuong.DisplayMember = "Display";
         this.cbPhuong.ValueMember   = "Value";
     }
     catch (Exception)
     {
     }
 }