Example #1
0
        /// <summary>
        /// 查询分页
        /// </summary>
        /// <returns></returns>
        public ActionResult GetPage()
        {
            string CompanyID = WebUtil.GetFormValue <string>("CompanyID");
            int    PageIndex = WebUtil.GetFormValue <int>("PageIndex", 1);
            int    PageSize  = WebUtil.GetFormValue <int>("PageSize", 10);

            string CateNum  = WebUtil.GetFormValue <string>("CateNum");
            string CateName = WebUtil.GetFormValue <string>("CateName");

            FinanceCateEntity entity = new FinanceCateEntity();

            entity.CateNum  = CateNum;
            entity.CateName = CateName;

            PageInfo pageInfo = new PageInfo();

            pageInfo.PageIndex = PageIndex;
            pageInfo.PageSize  = PageSize;

            FinanceCateProvider      provider = new FinanceCateProvider(CompanyID);
            List <FinanceCateEntity> list     = provider.GetList(entity, ref pageInfo);

            DataListResult <FinanceCateEntity> result = new DataListResult <FinanceCateEntity>()
            {
                Code = (int)EResponseCode.Success, Message = "响应成功", Result = list, PageInfo = pageInfo
            };

            return(Content(JsonHelper.SerializeObject(result)));
        }
Example #2
0
        /// <summary>
        /// 查询财务类别列表
        /// </summary>
        /// <returns></returns>
        public ActionResult GetList()
        {
            string CompanyID = WebUtil.GetFormValue <string>("CompanyID");
            FinanceCateProvider                provider = new FinanceCateProvider(CompanyID);
            List <FinanceCateEntity>           list     = provider.GetList();
            DataListResult <FinanceCateEntity> result   = new DataListResult <FinanceCateEntity>()
            {
                Code = (int)EResponseCode.Success, Message = "响应成功", Result = list
            };

            return(Content(JsonHelper.SerializeObject(result)));
        }