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"); } }
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"); } }