Пример #1
0
        public static void AddItem(APISalesOnlineItemsPromotion postedItem)
        {
            APISalesOnlineItemsPromotion item = postedItem;

            item.NumberOrder = GetData().Max(m => m.NumberOrder) + 1;
            SalesOnlineItemsPromotionList.GetData().Add(postedItem);
        }
Пример #2
0
        public static void UpdateItem(APISalesOnlineItemsPromotion postedItem)
        {
            var editedModel = SalesOnlineItemsPromotionList.GetData().First(i => i.NumberOrder == postedItem.NumberOrder);

            editedModel.NumberOrder   = postedItem.NumberOrder;
            editedModel.Code          = postedItem.Code;
            editedModel.Name          = postedItem.Name;
            editedModel.Specification = postedItem.Specification;
            editedModel.Weight        = postedItem.Weight;
            editedModel.Unit          = postedItem.Unit;
            editedModel.Quantity      = postedItem.Quantity;
            editedModel.Note          = postedItem.Note;
        }
Пример #3
0
        public static void DeleteItem(int ma)
        {
            var deleteItem = SalesOnlineItemsPromotionList.GetData().First(i => i.NumberOrder == ma);

            SalesOnlineItemsPromotionList.GetData().Remove(deleteItem);
        }