コード例 #1
0
        public MODEL.DataTableModel.DataTableGrid GetCategoryGridTree(MODEL.DataTableModel.DataTableRequest treeData)
        {
            int count = 0;

            var data = base.GetListBy(sc => true).OrderBy(sc => sc.CATE_CD);

            count = data.Count();
            //GetPermission(request, out count);
            List <VIEW_MST_CATEGORY> listCategory = new List <VIEW_MST_CATEGORY>();
            //查找所有的一级权限
            var ParentCatalog = data.Where(con => con.SYNCOPERATION != "D");

            foreach (var parent in ParentCatalog)
            {
                //实体转化
                VIEW_MST_CATEGORY parentItem = VIEW_MST_CATEGORY.ToViewModel(parent);
                //获取子级
                GetCategoryChildren(ref parentItem, data.ToList());
                listCategory.Add(parentItem);
            }
            return(new MODEL.DataTableModel.DataTableGrid()
            {
                data = listCategory,
                total = count
            });
        }
コード例 #2
0
        public MODEL.DataTableModel.DataTableGrid GetWeChatMsgSetForGrid(MODEL.DataTableModel.DataTableRequest request)
        {
            try
            {
                var predicate = PredicateBuilder.True <YX_Event>();

                DateTime time = TypeParser.ToDateTime("1975-1-1");

                int total = 0;
                //predicate = predicate.And(p => p.isdelete != 1);
                IBLLService.IYX_Event_MANAGER YX_Event_MANAGER = new BLLService.YX_Event_MANAGER();
                var data = VIEW_YX_Event.ToListViewModel(YX_Event_MANAGER.LoadPagedList(request.PageNumber, request.PageSize, ref total, predicate, request.Model, p => true, request.SortOrder, request.SortName));

                //var list = ViewModelProduct.ToListViewModel(data);
                return(new MODEL.DataTableModel.DataTableGrid()
                {
                    draw = request.Draw,
                    data = data,
                    total = total
                });
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #3
0
        public MODEL.DataTableModel.DataTableGrid GetWeChatUserForGrid(MODEL.DataTableModel.DataTableRequest request)
        {
            try
            {
                var predicate = PredicateBuilder.True <YX_weiUser>();

                DateTime time = TypeParser.ToDateTime("1975-1-1");

                int total = 0;
                //string strSql = "select * from FW_GEO_NODE";
                //SqlParameter[] parameters = {
                //         new SqlParameter("@id", "")

                //                 };
                var list = IDBSession.ISYS_USERLOGIN_REPOSITORY.LoadListBy(su => su.LOGIN_ID == OperateContext.Current.UsrId).Select(su => su.SLSORG_CD);

                predicate = predicate.And(p => list.Contains(p.TREE_NODE_ID));

                var data = base.LoadPagedList(request.PageNumber, request.PageSize, ref total, predicate, request.Model, p => true, request.SortOrder, request.SortName);
                //var list = ViewModelProduct.ToListViewModel(data);
                return(new MODEL.DataTableModel.DataTableGrid()
                {
                    draw = request.Draw,
                    data = VIEW_YX_weiUser.ToListViewModel(data),
                    total = total
                });
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #4
0
        public MODEL.DataTableModel.DataTableGrid GetOrderForGrid(MODEL.DataTableModel.DataTableRequest request)
        {
            try
            {
                var predicate = PredicateBuilder.True <TG_order>();

                DateTime time = TypeParser.ToDateTime("1975-1-1");

                int total = 0;

                var list     = IDBSession.ISYS_USERLOGIN_REPOSITORY.LoadListBy(su => su.LOGIN_ID == OperateContext.Current.UsrId).Select(su => su.SLSORG_CD);
                var userlist = IDBSession.IYX_weiUser_REPOSITORY.LoadListBy(wu => list.Contains(wu.TREE_NODE_ID)).Select(su => su.userNum);
                predicate = predicate.And(o => o.SYNCOPERATION != "D" && userlist.Contains(o.UserId));
                var data = base.LoadPagedList(request.PageNumber, request.PageSize, ref total, predicate, request.Model, p => true, request.SortOrder, request.SortName).ToList();//Select(p => VIEW_TG_order.ToViewModel(p));
                //var list = ViewModelProduct.ToListViewModel(data);
                return(new MODEL.DataTableModel.DataTableGrid()
                {
                    draw = request.Draw,
                    data = VIEW_TG_order.ToListViewModel(data),
                    total = total
                });
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #5
0
        public MODEL.DataTableModel.DataTableGrid GetAllUsers(MODEL.DataTableModel.DataTableRequest request)
        {
            try
            {
                var predicate = PredicateBuilder.True <FW_USER>();

                DateTime time = TypeParser.ToDateTime("1975-1-1");

                int total = 0;
                var list  = IDBSession.ISYS_USERLOGIN_REPOSITORY.LoadListBy(su => su.LOGIN_ID == OperateContext.Current.UsrId).Select(su => su.SLSORG_CD);

                predicate = predicate.And(p => list.Contains(p.TREENODE_ID) && p.USER_ID != OperateContext.Current.UsrId);
                //predicate = predicate.And(p => p.isdelete != 1);

                var data = base.LoadPagedList(request.PageNumber, request.PageSize, ref total, predicate, request.Model, p => true, request.SortOrder, request.SortName).Select(u => new VIEW_FW_USER()
                {
                    USER_ID       = u.USER_ID,
                    USER_NAME     = u.USER_NAME,
                    USER_TYPE     = u.USER_TYPE,
                    PHONE         = u.PHONE,
                    POSITION      = u.POSITION,
                    ENG_NAME      = u.ENG_NAME,
                    EMAIL         = u.EMAIL,
                    LOCK_IND      = u.LOCK_IND,
                    ACTIVE        = u.ACTIVE,
                    CREATE_DT     = u.CREATE_DT,
                    LAST_LOGON_DT = u.LAST_LOGON_DT
                });
                //var list = ViewModelProduct.ToListViewModel(data);
                return(new MODEL.DataTableModel.DataTableGrid()
                {
                    draw = request.Draw,
                    data = data,
                    total = total
                });
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #6
0
        public MODEL.DataTableModel.DataTableGrid GetMenusForGrid(MODEL.DataTableModel.DataTableRequest request)
        {
            try
            {
                var predicate = PredicateBuilder.True <FW_MODULE>();

                DateTime time = TypeParser.ToDateTime("1975-1-1");

                int total = 0;
                //predicate = predicate.And(p => p.isdelete != 1);

                var data = base.LoadPagedList(request.PageNumber, request.PageSize, ref total, predicate, request.Model, p => true, request.SortOrder, request.SortName).Select(p => new VIEW_FW_MODULE()
                {
                    MODULE_ID         = p.MODULE_ID,
                    MODULE_NAME       = p.MODULE_NAME,
                    MODULE_LINK       = p.MODULE_LINK,
                    ICON              = p.ICON,
                    MODULE_PID        = p.MODULE_PID,
                    SEQ_NO            = p.SEQ_NO,
                    ISVISIBLE         = p.ISVISIBLE,
                    ISLEAF            = p.ISLEAF,
                    ISMENU            = p.ISMENU,
                    MODULE_CONTROLLER = p.MODULE_CONTROLLER,
                    CREATE_DT         = p.CREATE_DT,
                    CREATE_BY         = p.CREATE_BY,
                    MODIFY_DT         = p.MODIFY_DT,
                    MODIFY_BY         = p.MODIFY_BY
                });
                //var list = ViewModelProduct.ToListViewModel(data);
                return(new MODEL.DataTableModel.DataTableGrid()
                {
                    draw = request.Draw,
                    data = data,
                    total = total
                });
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #7
0
ファイル: MST_PRD_MANAGER .cs プロジェクト: elainte/SSHBM
        public MODEL.DataTableModel.DataTableGrid GetProductsForGrid(MODEL.DataTableModel.DataTableRequest request)
        {
            try
            {
                var predicate = PredicateBuilder.True <MST_PRD>();

                DateTime time = TypeParser.ToDateTime("1975-1-1");

                int total = 0;
                predicate = predicate.And(p => p.ISCHECK == true);

                var data = base.LoadPagedList(request.PageNumber, request.PageSize, ref total, predicate, request.Model, p => true, request.SortOrder, request.SortName).Select(p => new VIEW_MST_PRD()
                {
                    SEQ_NO         = p.SEQ_NO,
                    PRD_CD         = p.PRD_CD,
                    PRD_NAME       = p.PRD_NAME,
                    PRD_SHORT_DESC = p.PRD_SHORT_DESC,
                    PRICE          = p.PRICE,
                    ARKETPRICE     = p.ARKETPRICE,
                    FRONTPRICE     = p.FRONTPRICE,
                    CATEGORY_NAME  = p.MST_CATEGORY.CATEGORY_NAME,
                    ISHOT          = p.ISHOT,
                    STATUS         = p.STATUS,
                    CREATE_DT      = p.CREATE_DT,
                    MODIFY_DT      = p.MODIFY_DT
                });
                //var list = ViewModelProduct.ToListViewModel(data);
                return(new MODEL.DataTableModel.DataTableGrid()
                {
                    draw = request.Draw,
                    data = data,
                    total = total
                });
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #8
0
        public MODEL.DataTableModel.DataTableGrid GetMenusButtonsForGrid(MODEL.DataTableModel.DataTableRequest request)
        {
            try
            {
                var predicate = PredicateBuilder.True <FW_MODULEPERMISSION>();

                DateTime time = TypeParser.ToDateTime("1975-1-1");

                int total = 0;
                //predicate = predicate.And(p => p.isdelete != 1);

                var data = base.LoadPagedList(request.PageNumber, request.PageSize, ref total, predicate, request.Model, p => true, request.SortOrder, request.SortName).Select(mp => new VIEW_MENUSBUTTONS()
                {
                    ModulePermissionID = mp.MP_ID,
                    MenuUrl            = mp.FW_PERMISSION.LINKURL,
                    MenuName           = mp.FW_MODULE.MODULE_NAME,
                    MenuID             = mp.FW_MODULE.MODULE_ID,
                    MenuNo             = mp.FW_MODULE.MODULE_ID,
                    ButtonName         = mp.FW_PERMISSION.NAME,
                    ButtonAction       = mp.FW_PERMISSION.ACTIONNAME,
                    ButtonID           = mp.FW_PERMISSION.PERMISSION_ID,
                    ButtonIcon         = mp.FW_PERMISSION.ICON,
                    MenuController     = mp.FW_PERMISSION.CONTROLLERNAME,
                    Description        = mp.FW_PERMISSION.REMARK,
                    ParentID           = mp.FW_PERMISSION.PERMISSION_PID
                });
                //var list = ViewModelProduct.ToListViewModel(data);
                return(new MODEL.DataTableModel.DataTableGrid()
                {
                    draw = request.Draw,
                    data = data,
                    total = total
                });
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #9
0
ファイル: MST_CAR_MANAGER.cs プロジェクト: shengshihai/SSHBM
        public MODEL.DataTableModel.DataTableGrid GetCarForGrid(MODEL.DataTableModel.DataTableRequest request)
        {
            try
            {
                var predicate = PredicateBuilder.True <MST_CAR>();

                DateTime time = TypeParser.ToDateTime("1975-1-1");

                int total = 0;
                predicate = predicate.And(p => p.SYNCOPERATION != "D");
                var list = IDBSession.ISYS_USERLOGIN_REPOSITORY.LoadListBy(su => su.LOGIN_ID == OperateContext.Current.UsrId).Select(su => su.SLSORG_CD);
                var data = base.LoadPagedList(request.PageNumber, request.PageSize, ref total, predicate, request.Model, p => true, request.SortOrder, request.SortName).Select(p => new VIEW_MST_CAR()
                {
                    CAR_CD       = p.CAR_CD,
                    CAR_BRAND    = p.CAR_BRAND,
                    CAR_CATEGORY = p.CAR_CATEGORY,
                    CAR_COLOR    = p.CAR_COLOR,
                    CAR_NUM      = p.CAR_NUM,
                    CAR_REMARK   = p.CAR_REMARK,
                    UserId       = list.Contains(p.YX_weiUser.TREE_NODE_ID)?p.UserId:"",
                    CAR_DATE     = p.CAR_DATE,
                    USERNAME     = list.Contains(p.YX_weiUser.TREE_NODE_ID)?p.YX_weiUser.userRelname:"",
                    USERTYPE     = list.Contains(p.YX_weiUser.TREE_NODE_ID)?p.YX_weiUser.isfenxiao:-1,
                    USERTEL      = list.Contains(p.YX_weiUser.TREE_NODE_ID) ? p.YX_weiUser.userTel : ""
                });
                //var list = ViewModelProduct.ToListViewModel(data);
                return(new MODEL.DataTableModel.DataTableGrid()
                {
                    draw = request.Draw,
                    data = data,
                    total = total
                });
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #10
0
        public MODEL.DataTableModel.DataTableGrid GetArticleForGrid(MODEL.DataTableModel.DataTableRequest request)
        {
            try
            {
                var predicate = PredicateBuilder.True <MST_ARTICLE>();

                DateTime time = TypeParser.ToDateTime("1975-1-1");

                int total = 0;
                predicate = predicate.And(p => p.SYNCOPERATION != "D");

                var data = base.LoadPagedList(request.PageNumber, request.PageSize, ref total, predicate, request.Model, p => true, request.SortOrder, request.SortName).Select(a => new VIEW_MST_ARTICLE()
                {
                    ARTICLE_ID  = a.ARTICLE_ID,
                    CATALOG_CD  = a.CATALOG_CD,
                    CODE        = a.CODE,
                    SUBTITLE    = a.SUBTITLE,
                    WRITER      = a.WRITER,
                    RESOURCE    = a.RESOURCE,
                    KEYWORDS    = a.KEYWORDS,
                    SEQ_NO      = a.SEQ_NO,
                    ACTIVE      = a.ACTIVE,
                    SYNCVERSION = a.SYNCVERSION
                });
                //var list = ViewModelProduct.ToListViewModel(data);
                return(new MODEL.DataTableModel.DataTableGrid()
                {
                    draw = request.Draw,
                    data = data,
                    total = total
                });
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #11
0
 public MODEL.DataTableModel.DataTableGrid GetUserGridMenus(MODEL.DataTableModel.DataTableRequest request, List <int> userMenuId, int parentid)
 {
     throw new NotImplementedException();
 }
コード例 #12
0
 public IEnumerable <FW_USER> GetAllUsers(MODEL.DataTableModel.DataTableRequest request, ref int Count)
 {
     throw new NotImplementedException();
 }