Beispiel #1
0
        public ActionResult DiscountNew(FormCollection form)
        {
            Korting newDiscount = new Korting(Convert.ToDouble(form["Percentage"]), form["Description"], Convert.ToDateTime(form["endDate"]));
            string  discountId  = newDiscount.SaveOrUpdate();

            string productIds = form["productIds"];

            string[] productidList = productIds.Split(',');

            foreach (string id in productidList)
            {
                Korting.AddKortingToProduct(discountId, id);
            }

            return(this.Discounts(""));
        }