private void btnNewDelivery_Click(object sender, EventArgs e) { frmAddEditDeliveries frm = new frmAddEditDeliveries(null, MethodType.Add); frm.ShowDialog(); Details(new UnitOfWork().DeliveriesRepo.Fetch().OrderByDescending(x => x.Id).FirstOrDefault()); }
private void btnNewPO_Click(object sender, EventArgs e) { frmAddEditDeliveries frm = new frmAddEditDeliveries(null, MethodType.Add); frm.ShowDialog(); DeliveryGrid.CreateUcControl(); detail(); }
private void btnEditDeliveries_Click(object sender, EventArgs e) { if (DeliveriesGrid.GetFocusedRow() is Deliveries item) { frmAddEditDeliveries frm = new frmAddEditDeliveries(item, MethodType.Edit); frm.ShowDialog(); Details(); } }
private void btnEditPo_Click(object sender, EventArgs e) { if (DeliveryGrid.GridView.GetFocusedRow() is Deliveries item) { frmAddEditDeliveries frm = new frmAddEditDeliveries(item, MethodType.Edit); frm.ShowDialog(); DeliveryGrid.CreateUcControl(); detail(); } }