Пример #1
0
        public ActionResult Edit(int id)
        {
            var model  = _thisBLL.Get(id);
            var childs = _orderDetailBLL.QueryByParent(id);
            var view   = new EditViewModel().GetView(model, childs.ToList());

            #region 例子
            //EditViewModel model = new EditViewModel
            //{
            //    Id = 1,
            //    OrderNo = "HW-172A1",
            //    Supplier = "健祥",
            //    Phone = "18925482905",
            //    Tel = "0769-2331416",
            //    Fax = "0769-83362507",
            //    OrderDate = "2016-11-29",
            //    DeliveryDate = "2016-12-26",
            //    Remark = "延后交货",
            //    Contract = "<p>合同内容</p>"
            //};
            //model.Details = new List<ViewModel.OrderDetail.EditViewModel>
            //{
            //    new ViewModel.OrderDetail.EditViewModel
            //    {
            //        Id = 1,
            //        SortIndex = 1,
            //        Size = "强化清玻380*206*5",
            //        Unit = "PCS",
            //        Total = 700,
            //        Remark = "四边细磨斜边20留3MM(请附备品)/WQ52C4DRTB用"
            //    },
            //    new ViewModel.OrderDetail.EditViewModel
            //    {
            //        Id = 2,
            //        SortIndex = 2,
            //        Size = "强化清玻386*118*5",
            //        Unit = "PCS",
            //        Total = 600,
            //        Remark = "四边细磨斜边20留3MM(请附备品)/W44CFD用"
            //    },
            //    new ViewModel.OrderDetail.EditViewModel
            //    {
            //        Id = 3,
            //        SortIndex = 3,
            //        Size = "强化清玻386*125*5",
            //        Unit = "PCS",
            //        Total = 600,
            //        Remark = "四边细磨斜边20留3MM(请附备品)/W44CDWEFD用"
            //    }
            //};
            #endregion
            return(View(view));
        }