public CellWindow(Cell cell) { _cell = cell; InitializeComponent(); ucSaveAndClose.CloseButtonClick = (sender, args) => Close(); ucSaveAndClose.SaveAndCloseButtonClick = SaveAndCloseButtonClick; WindowStartupLocation = WindowStartupLocation.CenterOwner; }
public void DeleteCell(Cell cell) { var existingCell = _context.Cells.SingleOrDefault(cl => cl.Id == cell.Id); if (existingCell == null) { return; } _context.Cells.Remove(existingCell); }
public void UpdateCell(Cell cell) { var existingCell = _context.Cells.SingleOrDefault(cl => cl.Id == cell.Id); if (existingCell == null) { return; } _context.Entry(existingCell).CurrentValues.SetValues(cell); _context.Entry(existingCell).State = EntityState.Modified; }
private void CellWindow_OnLoaded(object sender, RoutedEventArgs e) { SetWarehousesValues(); if (_cell == null) { _cell = new Cell(); } else { SetCellValues(); } }
public LVCellsItems(Cell cell) { Number = cell.Number; if (cell.Warehouse != null) { Warehouse = cell.Warehouse.Name; } Value = cell.GoodsInCells.Count; MaxValue = cell.MaxValue; Id = cell.Id; }
public void UpdateGoodInCell(Good good, Cell cell) { throw new System.NotImplementedException(); }
public void AddCell(Cell cell) { _context.Cells.Add(cell); }