public void loadcombo() { loaddatabase(); ; GoiHopDongDao ghd = new GoiHopDongDao(); foreach (var item in ghd.Load()) { cboMaGoiHD.Properties.Items.Add(item.MaGoiHD); } ChuKyThanhToanDao cktt = new ChuKyThanhToanDao(); foreach (var item in cktt.Load()) { cboMaChuKy.Properties.Items.Add(item.MaChuKy); } KhachHangDao kh = new KhachHangDao(); foreach (var item in kh.Load()) { cboMaKH.Properties.Items.Add(item.MaKH); } }
public ucHopDong() { InitializeComponent(); HopDongDao hd = new HopDongDao(); hopDongsBindingSource.DataSource = hd.Load(); GoiHopDongDao ghd = new GoiHopDongDao(); foreach (var item in ghd.Load()) { cboMaGoiHD.Properties.Items.Add(item.MaGoiHD); } ChuKyThanhToanDao cktt = new ChuKyThanhToanDao(); foreach (var item in cktt.Load()) { cboMaChuKy.Properties.Items.Add(item.MaChuKy); } KhachHangDao kh = new KhachHangDao(); foreach (var item in kh.Load()) { cboMaKH.Properties.Items.Add(item.MaKH); } }
private void simpleButton1_Click(object sender, EventArgs e) { try { ChuKyThanhToanDao ckttd = new ChuKyThanhToanDao(); if (cboSothang.Text == "" || txtMaCK.Text == "") { XtraMessageBox.Show("Nhập Đầy Đủ Thông Tin"); } else { if (ckttd.checkchukythanhtoantontai(txtMaCK.Text) == 0) { string chuky = cboSothang.Text + " " + labelControl3.Text; ckttd.ThemCKTT(txtMaCK.Text, chuky); XtraMessageBox.Show("Thêm Thành Công"); f.refresh(); this.Close(); } else { XtraMessageBox.Show("Mã chu kỹ nhập vào đã có sẵn!!"); } } } catch (Exception ex) { XtraMessageBox.Show("Có Lỗi Xảy Ra"); } }
public void loadcombo() { GoiHopDongDao ghd = new GoiHopDongDao(); foreach (var item in ghd.Load()) { cboMaGHD.Properties.Items.Add(item.MaGoiHD); } HopDongDao hdd = new HopDongDao(); txtMaHD.Text = hdd.getlasthopdong(); ChuKyThanhToanDao cktt = new ChuKyThanhToanDao(); foreach (var item in cktt.Load()) { cboMaCK.Properties.Items.Add(item.MaChuKy); } KhachHangDao kh = new KhachHangDao(); foreach (var item in kh.Load()) { cboMaKH.Properties.Items.Add(item.MaKH); } }
public ucThongTinChuKyThanhToan() { InitializeComponent(); ChuKyThanhToanDao ck = new ChuKyThanhToanDao(); chuKyThanhToansBindingSource.DataSource = ck.Load(); loaddata(); }
private void btnXoa_Click(object sender, EventArgs e) { if (txtMaChuKy.Text == "") { XtraMessageBox.Show("Bạn chưa chọn dòng!!"); } else { DialogResult dialogResult = XtraMessageBox.Show("Xác nhận", "Bạn thực sự muốn xóa?", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { ChuKyThanhToanDao ck = new ChuKyThanhToanDao(); ck.xoaCKTT(txtMaChuKy.Text); XtraMessageBox.Show("Đã xóa thành công!!"); this.refresh(); reset(); } } }
private void btnLuu_Click(object sender, EventArgs e) { try { if (txtMaChuKy.Text == "" || cboSothang.Text == "") { XtraMessageBox.Show("Mời Chọn Mục Cần Sửa"); } else { ChuKyThanhToanDao chuKy = new ChuKyThanhToanDao(); string chuky = cboSothang.Text + " " + "tháng"; chuKy.SuaCKTT(txtMaChuKy.Text, chuky); XtraMessageBox.Show("Sửa Thành Công"); this.refresh(); } } catch (Exception ex) { XtraMessageBox.Show("Chọn Mục Cần Sửa"); } }
private void simpleButton1_Click(object sender, EventArgs e) { try { if (cboSothang.Text == "" || txtMaCK.Text == "") { XtraMessageBox.Show("Nhập Đầy Đủ Thông Tin"); } else { ChuKyThanhToanDao ck = new ChuKyThanhToanDao(); string chuky = cboSothang.Text + " " + cbothang.Text; ck.ThemCKTT(txtMaCK.Text, chuky); XtraMessageBox.Show("Thêm Thành Công"); f.refresh(); this.Close(); } } catch (Exception ex) { XtraMessageBox.Show("Có Lỗi Xảy Ra"); } }
public void refresh() { ChuKyThanhToanDao ck = new ChuKyThanhToanDao(); chuKyThanhToansBindingSource.DataSource = ck.Load(); }