Пример #1
0
        private void itemThem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmMenuEdit frm = new frmMenuEdit();

            frm.ShowDialog();
            LoadData();
        }
Пример #2
0
 private void itemSua_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         if (gvMenu.GetFocusedRowCellValue("ID") == null)
         {
             XtraMessageBox.Show("Hãy chọn [Món] cần sửa.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
             return;
         }
         var         row = (clsMenu)gvMenu.GetFocusedRow();
         frmMenuEdit frm = new frmMenuEdit();
         frm.ID           = (int)gvMenu.GetFocusedRowCellValue("ID");
         frm.objMN_Select = row;
         frm.ShowDialog();
         row = frm.objMN_Select;
         gvMenu.RefreshRow(gvMenu.FocusedRowHandle);
     }
     catch (Exception)
     {
         throw;
     }
 }