示例#1
0
        private void itemThem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmNhapKho frm = new frmNhapKho();

            frm.ShowDialog();
            LoadData();
        }
示例#2
0
 private void itemSua_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         if (gvNhapKho.GetFocusedRowCellValue("ID") == null)
         {
             XtraMessageBox.Show("Bạn chưa chọn dòng cần sửa.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
             return;
         }
         var        row = (NhapKho_SelectResult)gvNhapKho.GetFocusedRow();
         frmNhapKho frm = new frmNhapKho();
         frm.ID           = (int)gvNhapKho.GetFocusedRowCellValue("ID");
         frm.objNK_Select = row;
         frm.ShowDialog();
         row = frm.objNK_Select;
         gvNhapKho.RefreshRow(gvNhapKho.FocusedRowHandle);
     }
     catch { }
 }