Esempio n. 1
0
        public IList <vAuthRoleNodeButton> GetListByUserIdNodeId(Guid iUserId, int iNodeId, bool isSuper)
        {
            var szServices = new DbHelperEfSql <vAuthRoleNodeButton>();

            if (isSuper)
            {
                return(szServices.SearchListByCondition(c => c.UserID == iUserId && c.NodeId == iNodeId, true, c => c.OrderIndex));
            }
            else
            {
                return(szServices.SearchListByCondition(c => c.UserID == iUserId && c.NodeId == iNodeId && c.IsSuper == 0, true, c => c.OrderIndex));
            }
        }
Esempio n. 2
0
        public IList <vLeftAuthRoleNode> SearchListByLeftUserId(Guid iUserId, bool isSuper)
        {
            var szServices = new DbHelperEfSql <vLeftAuthRoleNode>();

            if (isSuper)
            {
                return(szServices.SearchListByCondition(c => c.UserID == iUserId, true, c => c.OrderIndex));
            }
            else
            {
                return(szServices.SearchListByCondition(c => c.UserID == iUserId && c.IsSuper == 0, true, c => c.OrderIndex));
            }
        }
Esempio n. 3
0
        public IList <Nodes> SearchLeftListByValid(bool isSuper, int nodeType)
        {
            var szServices = new DbHelperEfSql <Nodes>();

            if (isSuper)
            {
                return(szServices.SearchListByCondition(c => c.IsValid == 1 && c.IsLeftNode == 1 && c.NodeBizType == nodeType));
            }
            else
            {
                return(szServices.SearchListByCondition(c => c.IsValid == 1 && c.IsLeftNode == 1 && c.IsSuper == 0 && c.NodeBizType == nodeType));
            }
        }
Esempio n. 4
0
        public IList <Nodes> SearchListByValid(bool isSuper)
        {
            var szServices = new DbHelperEfSql <Nodes>();

            if (isSuper)
            {
                return(szServices.SearchListByCondition(c => c.IsValid == 1));
            }
            else
            {
                return(szServices.SearchListByCondition(c => c.IsValid == 1 && c.IsSuper == 0));
            }
        }
Esempio n. 5
0
        public double SearchByCustomerAgeAverage()
        {
            var szSrevices = new DbHelperEfSql <tbCustomer>();
            var list       = szSrevices.SearchListByCondition(c => c.IsValid == 1 && c.BedID != null);

            return(list.Average(c => c.CustomerAge) ?? 0);
        }
Esempio n. 6
0
        private void DoNurseByWhole(Guid welfareCentreId, Guid CustomerID, Guid HgID, Guid NursingMessageID, ref string content)
        {
            var szServices = new DbHelperEfSql <tbNursingPer>();
            var list       = szServices.SearchListByCondition(c => c.CustomerID == CustomerID && c.HgID == HgID && c.NursingMessageID == NursingMessageID && c.WelfareCentreID == welfareCentreId && c.IsValid == 1);

            if (list == null || list.Count <= 0)
            {
                return;
            }
            var arrayRank = new List <int?>();

            foreach (var item in list)
            {
                arrayRank.Add(item.NursingRankID);
            }
            var szRank = new DbHelperEfSql <tbNursingRank>();
            var source = szRank.SearchListByCondition(c => arrayRank.Contains(c.ID) && c.WelfareCentreID == welfareCentreId);

            if (source == null)
            {
                source = new List <tbNursingRank>();
            }

            var szServiceExt = new DbHelperEfSql <tbNursingPerExt>();
            var sourceExt    = szServiceExt.SearchListByCondition(c => c.CustomerID == CustomerID && c.HgID == HgID && c.NursingMessageID == NursingMessageID && c.WelfareCentreID == welfareCentreId && c.IsValid == 1);

            if (sourceExt == null)
            {
                sourceExt = new List <tbNursingPerExt>();
            }


            DoFactNurseByWhole(welfareCentreId, source, sourceExt, ref content);
        }
Esempio n. 7
0
        public IList <vNodeButton> SearchByValid(bool isSuper)
        {
            var szServices = new DbHelperEfSql <vNodeButton>();

            if (isSuper)
            {
                return(szServices.SearchByAll());
            }
            else
            {
                return(szServices.SearchListByCondition(c => c.IsSuper == 0));
            }
        }
Esempio n. 8
0
        /// <summary>
        /// 递归获取子项内容
        /// </summary>
        /// <param name="parentId"></param>
        /// <param name="resultList"></param>
        /// <param name="list"></param>
        private void SearchListByWhole(int parentId, Guid?welfareCentreId, IList <tbNursingRank> resultList, IList <tbNursingRank> list)
        {
            var szServices = new DbHelperEfSql <tbNursingRank>();

            list = szServices.SearchListByCondition(c => c.ParentID == parentId && c.WelfareCentreID == welfareCentreId && c.IsValid == 1, true, c => c.OrderIndex);
            if (list != null && list.Count > 0)
            {
                foreach (var item in list)
                {
                    resultList.Add(item);
                    SearchListByWhole(item.ID, item.WelfareCentreID, resultList, list);
                }
            }
        }
Esempio n. 9
0
        /// <summary>
        ///  递归获取护理内容项顶级id
        ///  修改方法:添加参数养老院id--welfareCentreId,防止多家养老院是取值重复 2019-02-28 林中枝修改
        /// </summary>
        /// <param name="parentId"></param>
        /// <param name="resultId"></param>
        private void DoExtByWhole(Guid?welfareCentreId, int?parentId, ref int resultId)
        {
            var szServices = new DbHelperEfSql <tbNursingRank>();
            var item       = szServices.SearchBySingle(c => c.ID == parentId && c.WelfareCentreID == welfareCentreId);

            if (item == null)
            {
                return;
            }
            var listK = szServices.SearchListByCondition(c => c.ParentID == 0 && c.WelfareCentreID == welfareCentreId && c.IsValid == 1);

            if (listK == null || listK.Count <= 0)
            {
                return;
            }
            if (listK.Count(c => c.ID == item.ParentID && c.WelfareCentreID == welfareCentreId) > 0)
            {
                resultId = item.ID;
            }
            else
            {
                DoExtByWhole(item.WelfareCentreID, item.ParentID, ref resultId);
            }
        }
Esempio n. 10
0
        public IList <AuthRoleNodeButton> GetListByRoleId(Guid?iRoleId)
        {
            var szServices = new DbHelperEfSql <AuthRoleNodeButton>();

            return(szServices.SearchListByCondition(c => c.RoleID == iRoleId));
        }
Esempio n. 11
0
        public IList <Nodes> GetListByLeftNode()
        {
            var szServices = new DbHelperEfSql <Nodes>();

            return(szServices.SearchListByCondition(c => c.IsLeftNode == 1));
        }
Esempio n. 12
0
        public IList <tbCustomer> SearchAllByIsValid()
        {
            var szSrevices = new DbHelperEfSql <tbCustomer>();

            return(szSrevices.SearchListByCondition(c => c.IsValid == 1));
        }
Esempio n. 13
0
        public IList <tbCustomer> SearchAllByIsValid(Guid welfareCentreId)
        {
            var szSrevices = new DbHelperEfSql <tbCustomer>();

            return(szSrevices.SearchListByCondition(c => c.IsValid == 1 && c.WelfareCentreID == welfareCentreId));
        }
Esempio n. 14
0
        /// <summary>
        /// 离院老人
        /// </summary>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <returns></returns>
        public IList <vCustomer> GetCustomerByLiyuan(Guid welfareCentreId, DateTime startDate, DateTime endDate)
        {
            var szServices = new DbHelperEfSql <vCustomer>();

            return(szServices.SearchListByCondition(c => c.WelfareCentreID == welfareCentreId && c.OperateDate >= startDate && c.OperateDate < endDate && c.IsValid != 1, false, c => c.OperateDate));
        }
Esempio n. 15
0
        public IList <tbCustomer> SearchAllOrderByName()
        {
            var szSrevices = new DbHelperEfSql <tbCustomer>();

            return(szSrevices.SearchListByCondition(c => c.IsValid == 1, true, c => c.CustomerXMPY));
        }
Esempio n. 16
0
        public IList <tbCustomer> SearchLaorenByZdzl(Guid welfareCentreId)
        {
            var szSrevices = new DbHelperEfSql <tbCustomer>();

            return(szSrevices.SearchListByCondition(c => c.IsValid == 1 && c.Describe == "重点照料" && c.WelfareCentreID == welfareCentreId));
        }
Esempio n. 17
0
        public IList <tbDictionary> SearchListByType(int iType)
        {
            var szService = new DbHelperEfSql <tbDictionary>();

            return(szService.SearchListByCondition(c => c.DictionaryID == iType && c.IsValid == 1));
        }
Esempio n. 18
0
        public IList <tbNursingRank> SearchListByParentId(Guid welfareCentreId)
        {
            var szServices = new DbHelperEfSql <tbNursingRank>();

            return(szServices.SearchListByCondition(c => c.ParentID == 0 && c.IsValid == 1 && c.WelfareCentreID == welfareCentreId, true, c => c.OperateDate));
        }
Esempio n. 19
0
        public IList <NodeButton> SearchByValid(int nodeId)
        {
            var szServices = new DbHelperEfSql <NodeButton>();

            return(szServices.SearchListByCondition(c => c.NodeId == nodeId));
        }
Esempio n. 20
0
        public IList <vNursingPerLedger> GetById(Guid?welfareCentreId)
        {
            var szServices = new DbHelperEfSql <vNursingPerLedger>();

            return(szServices.SearchListByCondition(c => c.WelfareCentreID == welfareCentreId && c.IsValid == 1));
        }
Esempio n. 21
0
        public IList <AuthNodeButton> GetListByUserId(Guid iUserId)
        {
            var szServices = new DbHelperEfSql <AuthNodeButton>();

            return(szServices.SearchListByCondition(c => c.UserID == iUserId));
        }
Esempio n. 22
0
        public IList <Nodes> SearchListByValid()
        {
            var szServices = new DbHelperEfSql <Nodes>();

            return(szServices.SearchListByCondition(c => c.IsValid == 1));
        }
Esempio n. 23
0
        public IList <Nodes> SearchListByType(int pId, int nodeType)
        {
            var szServices = new DbHelperEfSql <Nodes>();

            return(szServices.SearchListByCondition(c => c.IsLeftNode == 1 && c.ParentID == pId && c.NodeBizType == nodeType));
        }
Esempio n. 24
0
        public IList <Nodes> GetListByLeftNode(int pId)
        {
            var szServices = new DbHelperEfSql <Nodes>();

            return(szServices.SearchListByCondition(c => c.IsLeftNode == 1 && c.ParentID == pId));
        }
Esempio n. 25
0
        public IList <Attachments> SearchListByPid(Guid pid, int tableType)
        {
            var szServices = new DbHelperEfSql <Attachments>();

            return(szServices.SearchListByCondition(c => c.ParentGUID == pid && c.TableType == tableType));
        }
Esempio n. 26
0
        public IList <tbOrgTLJGCongYe> SearchListByValid(Guid welfareCentreId)
        {
            var szServices = new DbHelperEfSql <tbOrgTLJGCongYe>();

            return(szServices.SearchListByCondition(c => c.IsValid == 1 && c.WelfareId == welfareCentreId));
        }
Esempio n. 27
0
        public IList <tbOrganization> SearchListByCondition()
        {
            var szSrevices = new DbHelperEfSql <tbOrganization>();

            return(szSrevices.SearchListByCondition(c => c.IsValid == 1));
        }
Esempio n. 28
0
        public IList <tbDictionary> SearchListByType(Guid welfareCentreId, int iType)
        {
            var szService = new DbHelperEfSql <tbDictionary>();

            return(szService.SearchListByCondition(c => c.DictionaryType == iType && c.WelfareCentreID == welfareCentreId && c.IsValid == 1, true, c => c.DictionaryID));
        }