private void btnNewPO_Click(object sender, EventArgs e) { frmAddEditMES frm = new frmAddEditMES(); frm.ShowDialog(); ucMES1.Create(); Detail(); }
private void btnEditPo_Click(object sender, EventArgs e) { if (ucMES1.GridView.GetFocusedRow() is MES item) { item = new UnitOfWork().MESRepo.Find(m => m.Id == item.Id); frmAddEditMES frm = new frmAddEditMES(item, MethodType.Edit); frm.ShowDialog(); ucMES1.Create(); Detail(); } }