示例#1
0
        // POST: Orders/Edit
        public ActionResult Edit(Order order)
        {
            var op = new OrderProcess();

            op.Edit(order);
            return(RedirectToAction("Index"));
        }
示例#2
0
        public ActionResult Edit(int id, FormCollection collection)
        {
            try
            {
                var state = collection["State"];
                var order = op.Find(id);
                order.State     = int.Parse(state);
                order.ChangedOn = DateTime.Now;
                op.Edit(order);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }