/// <summary>
        /// 关键词列表
        /// </summary>
        /// <param name="grid"></param>
        /// <returns></returns>
        public JsonResult GetData(GridSettings grid)
        {
            var query = bKeywords.Entities;

            //filtring
            query = GridFilter.Filtring<Zs_Keywords>(grid, query);

            //sorting
            query = query.OrderBy<Zs_Keywords>(grid.SortColumn, grid.SortOrder);

            //count
            var count = query.Count();

            //paging
            var data = query.Skip((grid.PageIndex - 1) * grid.PageSize).Take(grid.PageSize).ToArray();

            //converting in grid format
            var result = new
            {
                total = (int)Math.Ceiling((double)count / grid.PageSize),
                page = grid.PageIndex,
                records = count,
                rows = (from item in data
                        select new
                        {
                            KwID = item.KwID,
                            ZsKeyWords = item.ZsKeyWords,
                            WeightNum = item.WeightNum,
                            KwStatus = item.KwStatus
                        }).ToArray()
            };

            //convert to JSON and return to client
            return Json(result, JsonRequestBehavior.AllowGet);
        }
Пример #2
0
        /// <summary>
        /// 行事历列表
        /// </summary>
        /// <param name="grid"></param>
        /// <returns></returns>
        public JsonResult GetData(GridSettings grid)
        {
            var query = bProject.Entities;

            //filtring
            query = GridFilter.Filtring<Zs_Project>(grid, query);

            //sorting
            query = query.OrderBy<Zs_Project>(grid.SortColumn, grid.SortOrder);

            //count
            var count = query.Count();

            //paging
            var data = query.Skip((grid.PageIndex - 1) * grid.PageSize).Take(grid.PageSize).ToArray();

            //converting in grid format
            var result = new
            {
                total = (int)Math.Ceiling((double)count / grid.PageSize),
                page = grid.PageIndex,
                records = count,
                rows = (from item in data
                        select new
                        {
                            ProjectID = item.ProjectID,
                            MID = item.MID,
                            ProTitle = item.ProTitle,
                            ProTitleShort = item.ProTitleShort,
                            ProInfo = item.ProInfo,
                            ImpropantWeight = item.ImpropantWeight,
                            UrgentWeight = item.UrgentWeight,
                            SortID = item.SortID,
                            StartDate = item.StartDate,
                            ExpectDate = item.ExpectDate,
                            ProStatus = item.ProStatus,
                            FinishedDate = item.FinishedDate,
                            ProgressNum = item.ProgressNum,
                            OpenStatus = item.OpenStatus,
                            CreateDate = item.CreateDate,
                            UpdateDate = item.UpdateDate,
                            ViewCount = item.ViewCount,
                            GoodCount = item.GoodCount,

                        }).ToArray()
            };

            //convert to JSON and return to client
            return Json(result, JsonRequestBehavior.AllowGet);
        }
Пример #3
0
        /// <summary>
        /// 感悟未来列表
        /// </summary>
        /// <param name="grid"></param>
        /// <returns></returns>
        public JsonResult GetData(GridSettings grid)
        {
            var query = bGanWu.Entities;

            //filtring
            query = GridFilter.Filtring<Zs_GanWu>(grid, query);

            //sorting
            query = query.OrderBy<Zs_GanWu>(grid.SortColumn, grid.SortOrder);

            //count
            var count = query.Count();

            //paging
            var data = query.Skip((grid.PageIndex - 1) * grid.PageSize).Take(grid.PageSize).ToArray();

            //converting in grid format
            var result = new
            {
                total = (int)Math.Ceiling((double)count / grid.PageSize),
                page = grid.PageIndex,
                records = count,
                rows = (from item in data
                        select new
                        {
                            GwID = item.GwID,
                            MID = item.MID,
                            GwTitle = item.GwTitle,
                            GwTitleShort = item.GwTitleShort,
                            GwInfo = item.GwInfo,
                            GwType = item.GwType,
                            OpenStatus = item.OpenStatus,
                            GotoDate = item.GotoDate,
                            PostDate = item.PostDate,
                            GwStatus = item.GwStatus,
                            SmsStatus = item.SmsStatus,
                            //SortID = item.SortID,
                            CreateDate = item.CreateDate,
                            UpdateDate = item.UpdateDate,
                            ViewCount = item.ViewCount,
                            GoodCount = item.GoodCount,

                        }).ToArray()
            };

            //convert to JSON and return to client
            return Json(result, JsonRequestBehavior.AllowGet);
        }
        /// <summary>
        /// 交友圈列表
        /// </summary>
        /// <param name="grid"></param>
        /// <returns></returns>
        public JsonResult GetData(GridSettings grid)
        {
            var query = bMemorialDay.Entities;

            //filtring
            query = GridFilter.Filtring<Zs_MemorialDay>(grid, query);
            
            //sorting
            query = query.OrderBy<Zs_MemorialDay>(grid.SortColumn, grid.SortOrder);

            //count
            var count = query.Count();

            //paging
            var data = query.Skip((grid.PageIndex - 1) * grid.PageSize).Take(grid.PageSize).ToArray();

            //converting in grid format
            var result = new
            {
                total = (int)Math.Ceiling((double)count / grid.PageSize),
                page = grid.PageIndex,
                records = count,
                rows = (from item in data
                        select new
                        {
                            MDayID = item.MDayID,
                            MID = item.MID,
                            FMID = item.FMID,
                            FName = item.FName,
                            MDayTitle = item.MDayTitle,
                            MDate = item.MDate,
                            CalendarType = item.CalendarType,
                            MDateEn = item.MDateEn,
                            AdvanceDay = item.AdvanceDay,
                            RouseDate = item.RouseDate,
                            RouseSms = item.RouseSms,
                            RouseMusic = item.RouseMusic,
                            MDayMsg = item.MDayMsg,
                            CreateDate = item.CreateDate,

                        }).ToArray()
            };

            //convert to JSON and return to client
            return Json(result, JsonRequestBehavior.AllowGet);
        }
Пример #5
0
        /// <summary>
        /// 国学列表
        /// </summary>
        /// <param name="grid"></param>
        /// <returns></returns>
        public JsonResult GetData(GridSettings grid)
        {
            var query = bGuoXue.Entities;

            //filtring
            query = GridFilter.Filtring<Zs_GuoXue>(grid, query);

            //sorting
            query = query.OrderBy<Zs_GuoXue>(grid.SortColumn, grid.SortOrder);

            //count
            var count = query.Count();

            //paging
            var data = query.Skip((grid.PageIndex - 1) * grid.PageSize).Take(grid.PageSize).ToArray();

            //converting in grid format
            var result = new
            {
                total = (int)Math.Ceiling((double)count / grid.PageSize),
                page = grid.PageIndex,
                records = count,
                rows = (from item in data
                        select new
                        {
                            GxID = item.GxID,
                            Keywords = item.Keywords,
                            GxTitle = item.GxTitle,
                            GxTitleShort = item.GxTitleShort,
                            GxInfo = item.GxInfo,
                            DicID = item.DicID,
                            CreateDate = item.CreateDate,
                            UpdateDate = item.UpdateDate,
                            GxStatusName = item.GxStatusName,
                            PublishDate = item.PublishDate,
                            ViewCount = item.ViewCount,
                            GoodCount = item.GoodCount,

                        }).ToArray()
            };

            //convert to JSON and return to client
            return Json(result, JsonRequestBehavior.AllowGet);
        }
Пример #6
0
        /// <summary>
        /// 交友圈列表
        /// </summary>
        /// <param name="grid"></param>
        /// <returns></returns>
        public JsonResult GetData(GridSettings grid)
        {
            var query = bFCircle.Entities;

            //filtring
            query = GridFilter.Filtring<Zs_FCircle>(grid, query);
            
            //sorting
            query = query.OrderBy<Zs_FCircle>(grid.SortColumn, grid.SortOrder);

            //count
            var count = query.Count();

            //paging
            var data = query.Skip((grid.PageIndex - 1) * grid.PageSize).Take(grid.PageSize).ToArray();

            //converting in grid format
            var result = new
            {
                total = (int)Math.Ceiling((double)count / grid.PageSize),
                page = grid.PageIndex,
                records = count,
                rows = (from item in data
                        select new
                        {
                            FCID = item.FCID,
                            MID = item.MID,
                            FCTitle = item.FCTitle,
                            FCInfo = item.FCInfo,
                            FCUrl = item.FCUrl,
                            ViewCount = item.ViewCount,
                            GoodCount = item.GoodCount,
                            CreateDate = item.CreateDate,

                        }).ToArray()
            };

            //convert to JSON and return to client
            return Json(result, JsonRequestBehavior.AllowGet);
        }
Пример #7
0
        /// <summary>
        /// 角色列表
        /// </summary>
        /// <param name="grid"></param>
        /// <returns></returns>
        public JsonResult GetData(GridSettings grid)
        {
            var query = bRole.Entities;

            //filtring
            query = GridFilter.Filtring<Zs_Role>(grid, query);

            //sorting
            query = query.OrderBy<Zs_Role>(grid.SortColumn, grid.SortOrder);

            //count
            var count = query.Count();

            //paging
            var data = query.Skip((grid.PageIndex - 1) * grid.PageSize).Take(grid.PageSize).ToArray();

            //converting in grid format
            var result = new
            {
                total = (int)Math.Ceiling((double)count / grid.PageSize),
                page = grid.PageIndex,
                records = count,
                rows = (from item in data
                        select new
                        {
                            RoleID = item.RoleID,
                            RoleCode = item.RoleCode,
                            RoleName = item.RoleName,
                            RoleProperty = item.RoleProperty,
                            Remark = item.Remark,
                            CreateDate = item.CreateDate
                        }).ToArray()
            };

            //convert to JSON and return to client
            return Json(result, JsonRequestBehavior.AllowGet);
        }
Пример #8
0
        /// <summary>
        /// 字典列表
        /// </summary>
        /// <param name="grid"></param>
        /// <returns></returns>
        public JsonResult GetData(GridSettings grid)
        {
            List<Zs_Dic> list = new List<Zs_Dic>();
            var cachedGridRows = bDic.Entities.OrderBy(f => f.lft).ToList();

            var hierarchyRows = from item in cachedGridRows
                                select new
                                {
                                    DicID = item.DicID,
                                    DicCode = item.DicCode,
                                    DicName = item.DicName,
                                    DicNameEn = item.DicNameEn,
                                    DicProperty = item.DicProperty,
                                    ParentID = item.ParentID,
                                    SortID = item.SortID,
                                    Remark = item.Remark,

                                    level = GetRowLevel(item.ParentID, cachedGridRows),
                                    isLeaf = IsLeafRow(item.DicID, cachedGridRows),
                                    parent = item.ParentID,
                                    expanded = true,
                                    loaded = true,
                                    lft = item.lft,
                                    rgt = item.rgt,
                                };

            //converting in grid format
            var result = new
            {
                total = 1,
                page = 1,
                records = 1,
                rows = (from item in hierarchyRows
                        select new
                        {
                            cell = new object[]
                            { 
                                item.DicID.ToString(), 
                                item.DicCode,
                                item.DicName, 
                                item.DicNameEn, 
                                item.DicProperty, 
                                item.ParentID,
                                item.SortID, 
                                item.Remark,

                                item.level,
                                item.isLeaf,
                                item.parent,
                                item.expanded,
                                item.loaded,
                                item.lft,
                                item.rgt,
                            }
                        }).ToArray()
            };

            //convert to JSON and return to client
            return Json(hierarchyRows, JsonRequestBehavior.AllowGet);
        }
Пример #9
0
        /// <summary>
        /// 权限列表
        /// </summary>
        /// <param name="grid"></param>
        /// <returns></returns>
        public JsonResult GetData(GridSettings grid)
        {
            List<Zs_Right> list = new List<Zs_Right>();
            var cachedGridRows = bRight.Entities.OrderBy(f => f.lft).ToList();

            var hierarchyRows = from item in cachedGridRows
                                select new
                                {
                                    RightID = item.RightID,
                                    RightCode = item.RightCode,
                                    RightName = item.RightName,
                                    ControllerName = item.ControllerName,
                                    ActionName = item.ActionName,
                                    ParentID = item.ParentID,
                                    SortID = item.SortID,
                                    RightProperty = item.RightProperty,
                                    Remark = item.Remark,
                                    CreateDate = item.CreateDate,

                                    lft = item.lft,
                                    rgt = item.rgt,
                                    level = GetRowLevel(item.ParentID, cachedGridRows),
                                    isLeaf = IsLeafRow(item.RightID, cachedGridRows),
                                    parent = item.ParentID,
                                    expanded = true,
                                    loaded = true,
                                };

            //converting in grid format
            var result = new
            {
                total = 1,
                page = 1,
                records = 1,
                rows = (from item in hierarchyRows
                        select new
                        {
                            cell = new object[]
                            { 
                                item.RightID, 
                                item.RightCode,
                                item.RightName, 
                                item.ControllerName, 
                                item.ActionName, 
                                item.ParentID,
                                item.SortID, 
                                item.RightProperty,
                                item.Remark,
                                item.CreateDate,

                                item.level,
                                item.isLeaf,
                                item.parent,
                                item.expanded,
                                item.loaded,
                                item.lft,
                                item.rgt,
                            }
                        }).ToArray()
            };

            //convert to JSON and return to client
            return Json(hierarchyRows, JsonRequestBehavior.AllowGet);
        }
Пример #10
0
        /// <summary>
        /// 关键词列表
        /// </summary>
        /// <param name="grid"></param>
        /// <returns></returns>
        public JsonResult GetData(GridSettings grid)
        {
            var query = bMember.Entities;

            //filtring
            query = GridFilter.Filtring<Zs_Member>(grid, query);

            //sorting
            query = query.OrderBy<Zs_Member>(grid.SortColumn, grid.SortOrder);

            //count
            var count = query.Count();

            //paging
            var data = query.Skip((grid.PageIndex - 1) * grid.PageSize).Take(grid.PageSize).ToArray();

            //converting in grid format
            var result = new
            {
                total = (int)Math.Ceiling((double)count / grid.PageSize),
                page = grid.PageIndex,
                records = count,
                rows = (from item in data
                        select new
                        {
                            MID = item.MID,
                            MCode = item.MCode,
                            MName = item.MName,
                            NickName = item.NickName,
                            Pwd = item.Pwd,
                            Sex = item.Sex,
                            IDType = item.IDType,
                            IDCode = item.IDCode,
                            BirthdayCn = item.BirthdayCn,
                            BirthdayEn = item.BirthdayEn,
                            CalendarType = item.CalendarType,
                            MyLife = item.MyLife,
                            Mobile = item.Mobile,
                            Email = item.Email,
                            QQ = item.QQ,
                            WeiXin = item.WeiXin,
                            Sina = item.Sina,
                            Address = item.Address,
                            PostCode = item.PostCode,
                            CountryID = item.CountryID,
                            ProvinceID = item.ProvinceID,
                            CityID = item.CityID,
                            AreaID = item.AreaID,
                            IconUrl = item.IconUrl,
                            MySign = item.MySign,
                            Remark = item.Remark,
                            CreateDate = item.CreateDate,
                            UpdateDate = item.UpdateDate,
                            MStatus = item.MStatus,
                            ActDate = item.ActDate,
                            DelStatus = item.DelStatus,
                            DelDate = item.DelDate

                        }).ToArray()
            };

            //convert to JSON and return to client
            return Json(result, JsonRequestBehavior.AllowGet);
        }
Пример #11
0
        /// <summary>
        /// 用户列表
        /// </summary>
        /// <param name="grid"></param>
        /// <returns></returns>
        public JsonResult GetData(GridSettings grid)
        {
            var query = bUser.Entities;
            
            //filtring
            query = GridFilter.Filtring<Zs_User>(grid, query);

            //sorting
            query = query.OrderBy<Zs_User>(grid.SortColumn, grid.SortOrder);

            //count
            var count = query.Count();

            //paging
            var data = query.Skip((grid.PageIndex - 1) * grid.PageSize).Take(grid.PageSize).ToArray();

            //converting in grid format
            var result = new
            {
                total = (int)Math.Ceiling((double)count / grid.PageSize),
                page = grid.PageIndex,
                records = count,
                rows = (from item in data
                        select new
                        {
                            ZsUserID = item.ZsUserID,
                            LoginName = item.LoginName,
                            Pwd = item.Pwd,
                            RoleID = item.RoleID,
                            Mobile = item.Mobile,
                            Email = item.Email,
                            UserStatus = item.UserStatus,
                            CreateDate = item.CreateDate,
                        }).ToArray()
            };

            //convert to JSON and return to client
            return Json(result, JsonRequestBehavior.AllowGet);
        }