private void btnThem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (bandedGridView1.RowCount < THAMSOBUS.Instance.GetDSQuiDinh().ToList()[0].SoLuongTacGia) { frmThemTacGia addTacGia = new frmThemTacGia(); addTacGia.ShowDialog(); } else { XtraMessageBox.Show("Vượt quá số lượng tác giả quy định!", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void simpleButton1_Click(object sender, EventArgs e) { frmThemTacGia addtg = new frmThemTacGia(); addtg.ShowDialog(); var a = QLTV_BUS.TACGIABUS.Instance.GetTacGia(); lkedit_TacGia.Properties.DataSource = a; lkedit_TacGia.Properties.ValueMember = "MaTacGia"; lkedit_TacGia.Properties.DisplayMember = "TenTacGia"; var b = QLTV_BUS.THELOAIBUS.Instance.GetTheLoai(); lkedit_TheLoai.Properties.DataSource = b; lkedit_TheLoai.Properties.ValueMember = "MaTheLoai"; lkedit_TheLoai.Properties.DisplayMember = "TenTheLoai"; var c = QLTV_BUS.TINHTRANGBUS.Instance.GetTinhTrang(); lkedit_TinhTrang.Properties.DataSource = c; lkedit_TinhTrang.Properties.ValueMember = "MaTinhTrang"; lkedit_TinhTrang.Properties.DisplayMember = "TenTinhTrang"; }
private void btnThem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frmThemTacGia addTacGia = new frmThemTacGia(); addTacGia.ShowDialog(); }