Ejemplo n.º 1
0
        public String FunctionList()
        {
            FunctionListViewData view = new FunctionListViewData();

            view.List = new List <FunctionInfo>();

            view.PageData                     = new PaginationData();
            view.PageData.PageIndex           = 1;
            view.PageData.PageSize            = 10;
            view.PageData.PagintionJsFunction = "window.System.FunctionList.search()";
            view.PageData.OrderBy             = "Code";

            string sql = @"SELECT A.CreatedBy, A.CreatedOn, A.ModifiedBy, A.ModifiedOn, A.FunctionGuid,
       A.Code, A.Name, A.Remark, B.Name AS SystemName
  FROM dbo.FunctionInfo AS A
  LEFT JOIN dbo.SystemInfo AS B ON A.SystemGuid = B.SystemGuid
";

            view.List = new Pagintion(sql, null, view.PageData).ToList <FunctionInfo>();
            return(PageViewHelper.LoadPage("/System/FunctionList.aspx", view));
        }
Ejemplo n.º 2
0
        public string Search(PaginationData pd)
        {
            FunctionListViewData view = new FunctionListViewData();

            view.PageData                     = new BaseFrameWork.Model.PaginationData();
            view.PageData.PageIndex           = pd.PageIndex;
            view.PageData.PageSize            = pd.PageSize;
            view.PageData.PagintionJsFunction = "window.System.FunctionList.search()";
            view.PageData.OrderBy             = pd.OrderBy;

            string sql = @"SELECT CreatedBy, CreatedOn, ModifiedBy, ModifiedOn, FunctionGuid,
       Code, Name, Remark
  FROM dbo.FunctionInfo
";

            view.List = new Pagintion(sql, null, view.PageData).ToList <FunctionInfo>();

            string table      = UserControlExcutor.RenderUserControl("/System/UserControl/FunctionList.ascx", view);
            string pagination = UserControlExcutor.RenderUserControl("/System/CommonUserControl/Pagination.ascx", view.PageData);

            return(JsonHelper.ToJson(new { table = table, pagination = pagination }));
        }