コード例 #1
0
        private void itemThem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmEditBan frm = new frmEditBan();

            frm.ShowDialog();
            LoadData();
        }
コード例 #2
0
 private void itemSua_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         if (gvBan.GetFocusedRowCellValue("ID") == null)
         {
             XtraMessageBox.Show("Hãy chọn [Bàn] cần sửa.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
             return;
         }
         frmEditBan frm = new frmEditBan();
         frm.ID = (int)gvBan.GetFocusedRowCellValue("ID");
         frm.ShowDialog();
         LoadData();
     }
     catch (Exception)
     {
         throw;
     }
 }