示例#1
0
        public ActionResult SalesList(int?st, int?ps)
        {
            int _stIndex  = 0;
            int _pageSize = 0;

            if (st.HasValue)
            {
                _stIndex = st.Value;
            }
            if (ps.HasValue)
            {
                _pageSize = ps.Value;
            }
            if (_stIndex <= 0)
            {
                _stIndex = 1;
            }
            if (_pageSize <= 0)
            {
                _pageSize = Infrastructure.Constants.Default.PageSize;
            }

            CurrentSearchModel.StartIndex = _stIndex;
            CurrentSearchModel.PageSize   = _pageSize;

            var _ssBO  = Infrastructure.BOVMMapper.Map <Models.SaleSearchVM, BO.SaleSearchBO>(CurrentSearchModel);
            var _ssrBO = _saleService.GetSalesList(_ssBO);

            Models.SaleSearchResultVM _model = Infrastructure.BOVMMapper.Map <BO.SaleSearchResultBO, Models.SaleSearchResultVM>(_ssrBO);

            _model.StartIndex = _stIndex;
            _model.PageSize   = _pageSize;

            return(PartialView("_SalesList", _model));
        }
示例#2
0
        public ActionResult DuePayments(int?st, int?ps)
        {
            int _stIndex  = 0;
            int _pageSize = 0;

            if (st.HasValue)
            {
                _stIndex = st.Value;
            }
            if (ps.HasValue)
            {
                _pageSize = ps.Value;
            }
            if (_stIndex <= 0)
            {
                _stIndex = 1;
            }
            if (_pageSize <= 0)
            {
                _pageSize = Infrastructure.Constants.Default.PageSize;
            }

            var _ssBO = Infrastructure.BOVMMapper.Map <Models.SaleSearchVM, BO.SaleSearchBO>(new Models.SaleSearchVM()
            {
                ClientID   = Infrastructure.Web.SessionManager.CurrentLoggedInUser.ClientID,
                StartIndex = _stIndex,
                PageSize   = _pageSize
            });
            var _ssrBO = _dashboardService.GetDuePayments(_ssBO);

            Models.SaleSearchResultVM _model = Infrastructure.BOVMMapper.Map <BO.SaleSearchResultBO, Models.SaleSearchResultVM>(_ssrBO);

            _model.StartIndex = _stIndex;
            _model.PageSize   = _pageSize;

            return(PartialView("_DuePayments", _model));
        }