public static void UpdateItem(APIGTOrderDetail postedItem) { var editedModel = GTOrderItemList.GetData().First(i => i.Code == postedItem.Code); editedModel.Items = postedItem.Items; editedModel.Unit = postedItem.Unit; editedModel.Quantity = postedItem.Quantity; editedModel.UnitPrice = postedItem.UnitPrice; editedModel.Total = postedItem.Total; }
public static void DeleteItem(int code) { var deleteItem = GTOrderItemList.GetData().First(i => i.Code == code); GTOrderItemList.GetData().Remove(deleteItem); }
public static void AddItem(APIGTOrderDetail postedItem) { GTOrderItemList.GetData().Add(postedItem); }