Esempio n. 1
0
 public ActionResult Edit(LineEditModel model)
 {
     LineSvc.UpdateUser(model.id, model.Province, model.city, model.intro
                        , model.title, model.PastPrice, model.discount);
     return(Json(new AjaxResult {
         status = "ok"
     }));
 }
Esempio n. 2
0
        // GET
        public ActionResult CreateOrderLine(string id)
        {
            var e = new LineEditModel();

            e.OrderId  = id;
            e.UniqueId = Guid.NewGuid().ToString();
            return(View("CreateOrderLine", e));
        }
Esempio n. 3
0
        public ActionResult CreateOrderLine(
            [Bind(Include = "UniqueID, OrderId, ProductTypeId, ExpectedDeliveryDate, NumberOrdered, Comment")] LineEditModel k)
        {
            if (!ModelState.IsValid)
            {
                return(View("EditOrderLine", k));
            }
            var line = new OrderLine();

            k.Update(line);
            Business.Save(line);
            return(RedirectToAction("OrderDetails", "Order", new { id = k.OrderId }));
        }
Esempio n. 4
0
        public ActionResult CreateTaxOnLine(
            [Bind(Include = "UniqueID, OrderId, OrderLineId, TaxType, TaxRate, Comment")]
            LineEditModel k)
        {
            if (!ModelState.IsValid)
            {
                return(View("EditTaxOnLine", k));
            }
            var line = new TaxOnLine();

            k.Update(line);
            Business.Save(line);
            return(RedirectToAction("OrderDetails", "Order", new { id = k.OrderId }));
        }
Esempio n. 5
0
        public ActionResult CreateChargeLine(
            [Bind(Include = "UniqueId, OrderId, OrderLineId, ExpectedDeliveryDate, Amount, Comment")]
            LineEditModel k)
        {
            if (!ModelState.IsValid)
            {
                return(View("EditChargeLine", k));
            }
            var line = new ChargeLine();

            k.Update(line);
            OrderLines.Instance.Add(line);
            return(RedirectToAction("OrderDetails", "Order", new { id = k.OrderId }));
        }
Esempio n. 6
0
        public ActionResult CreateTaxOnLine(
            [Bind(Include = "UniqueID, ExpectedDeliveryDate, Comment")]
            LineEditModel k)
        {
            if (!ModelState.IsValid)
            {
                return(View("EditTaxOnLine", k));
            }
            var line = new TaxOnLine();

            k.Update(line);
            OrderLines.Instance.Add(line);
            return(RedirectToAction("OrderDetails"));
        }
Esempio n. 7
0
        // GET: Order/Create
        public ActionResult CreateOrderLine()
        {
            var e = new LineEditModel();

            return(View("CreateOrderLine", e));
        }