Example #1
0
        public static void ModifyMilk(string Name, string CountryOfOrigin, string brand, decimal UnitPrice, string ContentDescription, DateTime DateOfManufacture, int CategoryId,
                                      int Id)
        {
            Milk milk = MilkService.GetMilkById(Id);

            milk.Id                 = Id;
            milk.Name               = Name;
            milk.CountryOfOrigin    = CountryOfOrigin;
            milk.Brand              = brand;
            milk.UnitPrice          = UnitPrice;
            milk.ContentDescription = ContentDescription;
            milk.DateOfManufacture  = DateOfManufacture;
            milk.Category           = CategoryService.GetCategoryById(CategoryId);
            MilkService.ModifyMilk(milk);
        }
Example #2
0
 public static Milk GetMilkById(int id)
 {
     return(MilkService.GetMilkById(id));
 }