Esempio n. 1
0
 public void FormView_InsertItem(Model.Order order)
 {
     var OrderService = new OrderService();
     OrderService.InsertOrder(order);
     Session["saved"] = true;
     Response.Redirect("~/");
 }
Esempio n. 2
0
        //hämtar order
        public Model.Order OrderFormView_GetItem([RouteData] int id)
        {
            try
            {
                OrderService orderservice = new OrderService();
                var order = orderservice.GetOrder(id);

                if (order.Status)
                {
                    PlaceHolderRec.Visible = true;
                    PlaceHolderNot.Visible = false;
                    return orderservice.GetOrder(id);
                }
                else
                {
                    return orderservice.GetOrder(id);

                }

            }
            catch (Exception)
            {
                ModelState.AddModelError(String.Empty, "Ett fel inträffade");
                return null;
            }
        }