Ejemplo n.º 1
0
        public string aj_MasterSearch(q_AspNetRoles q)
        {
            var items = roleManager.Roles.ToList();

            return(defJSON(new GridInfo <IdentityRole>()
            {
                rows = items,
                total = PageCount.TotalPage,
                page = PageCount.Page,
                records = PageCount.RecordCount,
                startcount = PageCount.StartCount,
                endcount = PageCount.EndCount
            }));
        }
Ejemplo n.º 2
0
        public async Task <IHttpActionResult> Get([FromUri] q_AspNetRoles q)
        {
            #region 連接BusinessLogicLibary資料庫並取得資料

            var items = await roleManager.Roles.ToArrayAsync();

            return(Ok(new GridInfo <IdentityRole>()
            {
                rows = items,
                total = PageCount.TotalPage,
                page = PageCount.Page,
                records = PageCount.RecordCount,
                startcount = PageCount.StartCount,
                endcount = PageCount.EndCount
            }));

            #endregion
        }