Example #1
0
 public CellWindow(Cell cell)
 {
     _cell = cell;
     InitializeComponent();
     ucSaveAndClose.CloseButtonClick = (sender, args) => Close();
     ucSaveAndClose.SaveAndCloseButtonClick = SaveAndCloseButtonClick;
     WindowStartupLocation = WindowStartupLocation.CenterOwner;
 }
Example #2
0
        public void DeleteCell(Cell cell)
        {
            var existingCell = _context.Cells.SingleOrDefault(cl => cl.Id == cell.Id);
            if (existingCell == null)
            {
                return;
            }

            _context.Cells.Remove(existingCell);
        }
Example #3
0
        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;
        }
Example #4
0
 private void CellWindow_OnLoaded(object sender, RoutedEventArgs e)
 {
     SetWarehousesValues();
     if (_cell == null)
     {
         _cell = new Cell();
     }
     else
     {
         SetCellValues();
     }
 }
Example #5
0
        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();
 }
Example #7
0
 public void AddCell(Cell cell)
 {
     _context.Cells.Add(cell);
 }