public Ejection EditEjection(int id, DateTime date, double volume, Employee culprit, Warehouse warehouse) { Ejection p = cont.Ejection.SingleOrDefault(ca => ca.Id == id); p.Date = date; p.Volume = volume; p.Culprit = culprit; p.Warehouse = warehouse; cont.SaveChanges(); return(p); }
public Ejection AddEjection(DateTime date, double volume, Employee culprit, Warehouse warehouse) { Ejection p = new Ejection { Date = DateTime.Now, Volume = volume, Culprit = culprit, Warehouse = warehouse, }; cont.Ejection.Add(p); cont.SaveChanges(); return(p); }
private void Eject() { Ejection?.Invoke(this, new EventArgs()); }