public ControlDaiLy() { InitializeComponent(); SetReadOnly(); hsBus = new HoSoBUS(); HoSoGrid.DataSource = hsBus.Load(); FunctionsCombo(function); }
public Rules_DaiLy() { InitializeComponent(); hsBus = new HoSoBUS(); LoaiDaiLyMax_txt.Enabled = false; DaiLyMax_txt.Enabled = false; quanToiDa_txt.Enabled = false; }
private void frmTiepNhanXeSua_Load(object sender, EventArgs e) { hsBus = new HoSoBUS(); hxBus = new HieuXeBUS(); loadHieuXeVao_combobox(); this.loadData_Vao_GridView(); bt_sua.Enabled = false; bt_xoa.Enabled = false; cb_hieuxe.Text = ""; int mahs = data_tiepnhan.RowCount + 1; tb_ma.Text = mahs.ToString(); }
public XoaLoaiFrm() { InitializeComponent(); hsBus = new HoSoBUS(); }
private void ControlMain_Load(object sender, EventArgs e) { hsBUS = new HoSoBUS(); quyDinhGrid.DataSource = hsBUS.QuyDinh(); }
public frmPhieuThuTien(HoSoDTO hs) { hsBus = new HoSoBUS(); this.hsDTO = hs; InitializeComponent(); }
private void confirm_btn_Click(object sender, EventArgs e) { hsBus = new HoSoBUS(); if (function.Text == "Thêm") { HoSoDTO hs = new HoSoDTO(); hs.ma = int.Parse(maHoSo_Txt.Text); hs.tenHoSo = tenHoSo_Txt.Text; hs.loai = int.Parse(loaiHoSo_Txt.Text); hs.tenQuan = quanHoSo_Txt.Text; hs.dienThoai = long.Parse(dtHoSo_Txt.Text); hs.day = dateHoSo_Txt.Value; hs.diaChi = diaChiHoSo_Txt.Text; hs.email = emailHoSo_Txt.Text; bool kq = hsBus.them(hs); if (kq == false) { MessageBox.Show("Thêm hồ sơ thất bại"); } else { MessageBox.Show("Thêm hồ sơ thành công"); } } if (function.Text == "Xóa") { HoSoDTO hs = new HoSoDTO(); hs.ma = int.Parse(maHoSo_Txt.Text); bool kq = hsBus.xoa(hs); if (kq == false) { MessageBox.Show("Xóa sơ thất bại"); } else { MessageBox.Show("Xóa sơ thành công"); } } if (function.Text == "Tìm") { //Check for valid text HoSoDTO hs = new HoSoDTO(); if (maHoSo_Txt.Text.Trim().Length > 0) { hs.ma = int.Parse(maHoSo_Txt.Text); } hs.tenHoSo = tenHoSo_Txt.Text; hs.tenQuan = quanHoSo_Txt.Text; if (dtHoSo_Txt.Text.Trim().Length > 0) { hs.dienThoai = long.Parse(dtHoSo_Txt.Text); } if (loaiHoSo_Txt.Text.Trim().Length > 0) { hs.loai = int.Parse(loaiHoSo_Txt.Text); } hs.email = emailHoSo_Txt.Text; hs.diaChi = diaChiHoSo_Txt.Text; HoSoGrid.DataSource = hsBus.search(hs, ngay); } if (function.Text == "Sửa") { HoSoDTO hs = new HoSoDTO(); hs.ma = int.Parse(maHoSo_Txt.Text); hs.tenHoSo = tenHoSo_Txt.Text; hs.loai = int.Parse(loaiHoSo_Txt.Text); hs.tenQuan = quanHoSo_Txt.Text; hs.dienThoai = long.Parse(dtHoSo_Txt.Text); hs.day = dateHoSo_Txt.Value; hs.diaChi = diaChiHoSo_Txt.Text; hs.email = emailHoSo_Txt.Text; bool kq = hsBus.sua(hs); if (kq == false) { MessageBox.Show("Sửa hồ sơ thất bại"); } else { MessageBox.Show("Sửa hồ sơ thành công"); } } if (function.Text != "Tìm") { HoSoGrid.DataSource = hsBus.Load(); } ClearAll(); SetReadOnly(); function.Text = string.Empty; }
public Rules_LoaiDaiLy() { InitializeComponent(); hsBus = new HoSoBUS(); loaiDaiLyGrid.DataSource = hsBus.LoadLoaidaiLy(); }
private void frmTraCuuXe_Load(object sender, EventArgs e) { hsBus = new HoSoBUS(); hxBus = new HieuXeBUS(); loadHieuXeVao_combobox(); }
public Rules_Quan() { InitializeComponent(); hsBus = new HoSoBUS(); quanGrid.DataSource = hsBus.loadQuan(); }