예제 #1
0
 public CellWindow(Cell cell)
 {
     _cell = cell;
     InitializeComponent();
     ucSaveAndClose.CloseButtonClick = (sender, args) => Close();
     ucSaveAndClose.SaveAndCloseButtonClick = SaveAndCloseButtonClick;
     WindowStartupLocation = WindowStartupLocation.CenterOwner;
 }
예제 #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);
        }
예제 #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;
        }
예제 #4
0
 private void CellWindow_OnLoaded(object sender, RoutedEventArgs e)
 {
     SetWarehousesValues();
     if (_cell == null)
     {
         _cell = new Cell();
     }
     else
     {
         SetCellValues();
     }
 }
예제 #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;
        }
예제 #6
0
 public void UpdateGoodInCell(Good good, Cell cell)
 {
     throw new System.NotImplementedException();
 }
예제 #7
0
 public void AddCell(Cell cell)
 {
     _context.Cells.Add(cell);
 }