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" })); }
// GET public ActionResult CreateOrderLine(string id) { var e = new LineEditModel(); e.OrderId = id; e.UniqueId = Guid.NewGuid().ToString(); return(View("CreateOrderLine", e)); }
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 })); }
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 })); }
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 })); }
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")); }
// GET: Order/Create public ActionResult CreateOrderLine() { var e = new LineEditModel(); return(View("CreateOrderLine", e)); }