public B2CPreAlterViewModel()
 {
     Param           = new B2CPreAlterListFilte();
     PagedList       = new PagedList <B2CPreAlterExt>();
     ShippingMethods = new List <SelectListItem>();
     SearchWheres    = new List <SelectListItem>();
     DateTimeWheres  = new List <SelectListItem>();
     StatusList      = new List <SelectListItem>();
 }
예제 #2
0
        public ActionResult SeachB2CPreAlterList(B2CPreAlterListFilte param)
        {
            var model = new B2CPreAlterViewModel {
                Param = param
            };

            model           = GetB2CPreAlterViewModel(model);
            model.PagedList = GetPageList(model);
            return(View(model));
        }
예제 #3
0
        public ActionResult SubmitB2CPreAlter(B2CPreAlterListFilte param)
        {
            var model = new B2CPreAlterViewModel {
                Param = param
            };

            model = GetB2CPreAlterViewModel(model);
            var result = false;

            try
            {
                if (param.IsSelectAll)
                {
                    result = _outStorageService.PreAlterB2CBySearch(new B2CPreAlterListParam()
                    {
                        CountryCode       = model.Param.CountryCode,
                        CustomerCode      = model.Param.CustomerCode,
                        EndTime           = model.Param.EndTime,
                        EndWeight         = model.Param.EndWeight,
                        IsSelectAll       = model.Param.IsSelectAll,
                        ShippingMethodId  = model.Param.ShippingMethodId,
                        ShippingMethodIds = model.ShippingMethods.Select(p => Int32.Parse(p.Value)).ToList(),
                        SearchTime        = model.Param.SearchTime,
                        SearchWhere       = model.Param.SearchWhere,
                        StartTime         = model.Param.StartTime,
                        StartWeight       = model.Param.StartWeight,
                        Status            = model.Param.Status,
                        OutStartTime      = model.Param.OutStartTime,
                        PageSize          = model.Param.PageSize,
                        Page          = model.Param.Page,
                        SearchContext = model.Param.SearchContext
                    });
                }
                else if (!param.SelectWayBillNumber.IsNullOrWhiteSpace())
                {
                    result = _outStorageService.PreAlterB2CByWayBillNumber(param.SelectWayBillNumber.Split(',').ToList());
                }
            }
            catch (Exception ex)
            {
                Log.Exception(ex);
            }
            if (result)
            {
                SetViewMessage(ShowMessageType.Success, "操作成功!");
            }
            else
            {
                SetViewMessage(ShowMessageType.Error, "操作失败!");
            }

            model.PagedList = GetPageList(model);
            return(View(model));
        }
예제 #4
0
        public ActionResult B2CPreAlterList(B2CPreAlterListFilte param = null)
        {
            var model = new B2CPreAlterViewModel();

            if (param != null)
            {
                model.Param          = param;
                model.Param.PageSize = param.PageSize;
                model           = GetB2CPreAlterViewModel(model);
                model.PagedList = GetPageList(model);
            }
            else
            {
                model = GetB2CPreAlterViewModel(model);
            }
            return(View(model));
        }