Beispiel #1
0
        public void EditSampleInventoryItem(SampleInventoryItem sampleInventoryItem)
        {
            var dbItem = base.GetById <SampleInventoryItem>(sampleInventoryItem.Id);

            dbItem.LastModified      = DateTime.Now;
            dbItem.StyleId           = sampleInventoryItem.Style.Id;
            dbItem.Size              = sampleInventoryItem.Size;
            dbItem.Color             = sampleInventoryItem.Color;
            dbItem.InventoryStatusId = sampleInventoryItem.InventoryStatus.Id;
            dbItem.DateOrdered       = sampleInventoryItem.DateOrdered;
            dbItem.DateRecieved      = sampleInventoryItem.DateRecieved;
            dbItem.Deleted           = sampleInventoryItem.Deleted;

            _dbContext.SaveChanges();
        }
Beispiel #2
0
        public void AddSampleInventoryItem(
            Style style,
            SampleInventoryStatusLookup inventoryStatus,
            string size,
            string color,
            DateTime dateOrdered,
            DateTime?dateRecieved)
        {
            var item = new SampleInventoryItem()
            {
                Style           = style,
                Size            = size,
                Color           = color,
                DateOrdered     = dateOrdered,
                DateRecieved    = dateRecieved,
                InventoryStatus = inventoryStatus
            };

            base.Add <SampleInventoryItem>(item);
        }