public async Task <OrderInventory> AddOrderInventoryAsync(OrderInventory orderInventory) { _dbContext.OrderInventory.Add(orderInventory); await _dbContext.SaveChangesAsync(); return(orderInventory); }
public OrderInventoryForm(Model model, OrderInventory item, bool newItem) { _model = model; _item = item; _newItem = newItem; InitializeComponent(); _sequenceId.Text = _item.SequenceId.ToString(); Inventory inventory = _model.GetInventory(_item.InventoryId); _inventory.Text = inventory != null ? inventory.DisplayString : string.Empty; _quantity.Text = _item.InventoryQuantity.ToString(); _price.Text = _item.InventoryPrice.ToString(); _date.Value = _item.InventoryDate; }
public bool OrderInventoryUpdate(OrderInventory item) { using (DbManager db = new DbManager()) return new OrderInventoryAccessor().Update(db, item); }
public bool OrderInventoryInsert(OrderInventory item) { using (DbManager db = new DbManager()) return new OrderInventoryAccessor().Insert(db, item); }
public OrderInvoiceViewModel CreateOrderInvoiceViewModel(CustomUser user, Product product, OrderInventory oInv) { OrderInvoiceViewModel ivm = new OrderInvoiceViewModel() { Id = user.Id, OrderId = oInv.OrderId, LocationId = user.DefaultStore, Product = product, Quantity = oInv.OrderQuantity, LineTotal = oInv.OrderQuantity * product.Price }; return(ivm); }
public GridItem(OrderInventory item, string name) { _name = name; _item = item; }
private void Edit(OrderInventory item) { using (OrderInventoryForm form = new OrderInventoryForm(_model, item, false)) { if (form.ShowDialog() != DialogResult.OK) item.RejectChanges(); else SetAllTotal(); } }