Example #1
0
        /// <summary>
        /// Áбí
        /// </summary>
        /// <returns></returns>
        public IActionResult OnPostDicList(int PageSize, int PageId, string DicId)
        {
            using (var db = new DataContext(AppEtl.Db))
            {
                var page = new FastUntility.Core.Page.PageModel();

                page.PageId   = PageId == 0 ? 1 : PageId;
                page.PageSize = PageSize == 0 ? 10 : PageSize;
                var list = new FastUntility.Core.Page.PageResult();
                if (string.IsNullOrEmpty(DicId))
                {
                    list = IFast.Query <Data_Dic_Details>(a => a.DicId != null).OrderBy <Data_Dic_Details>(a => new { a.DicId }).ToPage(page, db);
                }
                else
                {
                    list = IFast.Query <Data_Dic_Details>(a => a.DicId == DicId).OrderBy <Data_Dic_Details>(a => new { a.DicId }).ToPage(page, db);
                }

                return(new PartialViewResult
                {
                    ViewName = "Partial/DicList",
                    ViewData = new ViewDataDictionary <FastUntility.Core.Page.PageResult>(ViewData, list)
                });
            }
        }
Example #2
0
        /// <summary>
        /// Áбí
        /// </summary>
        /// <returns></returns>
        public IActionResult OnPostBusinessList(int PageSize, int PageId, string OrderBy, string TableName)
        {
            using (var db = new DataContext(AppEtl.Db))
            {
                var page = new FastUntility.Core.Page.PageModel();
                page.PageId   = PageId == 0 ? 1 : PageId;
                page.PageSize = PageSize == 0 ? 10 : PageSize;

                if (string.IsNullOrEmpty(OrderBy))
                {
                    OrderBy = "TableName desc";
                }

                var param = new List <OracleParameter>();
                param.Add(new OracleParameter {
                    ParameterName = "TableName", Value = TableName.ToStr().ToUpper()
                });
                param.Add(new OracleParameter {
                    ParameterName = "OrderBy", Value = OrderBy
                });
                var list = IFast.QueryPage(page, "Business.List", param.ToArray(), db);

                return(new PartialViewResult
                {
                    ViewName = "Partial/BusinessList",
                    ViewData = new ViewDataDictionary <FastUntility.Core.Page.PageResult>(ViewData, list)
                });
            }
        }
Example #3
0
        /// <summary>
        /// Áбí
        /// </summary>
        /// <returns></returns>
        public IActionResult OnPostDataList(int PageSize, int PageId)
        {
            using (var db = new DataContext(AppEtl.Db))
            {
                var page = new FastUntility.Core.Page.PageModel();
                page.PageId   = PageId == 0 ? 1 : PageId;
                page.PageSize = PageSize == 0 ? 10 : PageSize;
                var list = IFast.Query <Data_Source>(a => a.Id != "").ToPage(page, db);

                return(new PartialViewResult
                {
                    ViewName = "Partial/DataList",
                    ViewData = new ViewDataDictionary <FastUntility.Core.Page.PageResult>(ViewData, list)
                });
            }
        }