Пример #1
0
        public ActionResult SubmitOrder(DomainModels.Order order)
        {
            var _order = ResolveService <IOrderService>().SubmitOrder(LoginUser.ID, order);

            return(View("SubmitOrderResult", new ViewModels.SubmitOrderResult
            {
                Success = true,
                Message = "已成功提交订单!",
                OrderID = _order.ID
            }));
        }
Пример #2
0
        public static ViewModels.Order CopyToViewModel(this DomainModels.Order domainModel, ViewModels.Order viewModel = null)
        {
            if (viewModel == null)
            {
                viewModel = new ViewModels.Order();
            }

            viewModel.ID         = domainModel.ID;
            viewModel.NO         = domainModel.NO;
            viewModel.OrderPrice = domainModel.OrderPrice;
            viewModel.SubmitDate = domainModel.SubmitDate;
            viewModel.Freight    = domainModel.Freight;

            return(viewModel);
        }