private void ThemBangKe(DataTable dt) { frmBangKeInput frm = new frmBangKeInput(dt);// them moi if (frm.ShowDialog(this) == DialogResult.OK) { LoadListBangKe(); } }
private void SuaBangKe() { grdDoiTac.SelectionMode = Janus.Windows.GridEX.SelectionMode.SingleSelection; if (grdDoiTac.SelectedItems.Count > 0) { GridEXRow row = ((GridEXSelectedItem)grdDoiTac.SelectedItems[0]).GetRow(); BangKe objBangKe = (BangKe)((GridEXSelectedItem)grdDoiTac.SelectedItems[0]).GetRow().DataRow; frmBangKeInput frm = new frmBangKeInput(objBangKe, dtDoiTac, false); if (frm.ShowDialog(this) == DialogResult.OK) { LoadListBangKe(); } } else { new MessageBox.MessageBox().Show("Bạn chưa nhập bảng kê để cập nhật", "Thông báo", Taxi.MessageBox.MessageBoxButtons.OK, Taxi.MessageBox.MessageBoxIcon.Error); } }
/// <summary> /// Mo form DOiTac de edit /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void grdDoiTac_DoubleClick(object sender, EventArgs e) { grdDoiTac.SelectionMode = Janus.Windows.GridEX.SelectionMode.SingleSelection; if (grdDoiTac.SelectedItems.Count > 0) { GridEXRow row = ((GridEXSelectedItem)grdDoiTac.SelectedItems[0]).GetRow(); BangKe objBangKe = (BangKe)((GridEXSelectedItem)grdDoiTac.SelectedItems[0]).GetRow().DataRow; frmBangKeInput frm = new frmBangKeInput(objBangKe, dtDoiTac, false); if (frm.ShowDialog(this) == DialogResult.OK) { LoadListBangKe(); } else { return; } } }