コード例 #1
0
        public bool IsAuthRoleNodeButton(Guid iUserid, int iNodeId, int iButtonId, bool isSuper)
        {
            var szServices = new DbHelperEfSql <vAuthRoleNodeButton>();

            if (isSuper)
            {
                return(szServices.Count(c => c.UserID == iUserid && c.NodeId == iNodeId && c.ButtonId == iButtonId) > 0);
            }
            else
            {
                return(szServices.Count(c => c.UserID == iUserid && c.NodeId == iNodeId && c.ButtonId == iButtonId && c.IsSuper == 0) > 0);
            }
        }
コード例 #2
0
        public int Count(Guid pid, int tableType)
        {
            var szServices = new DbHelperEfSql <Attachments>();

            return(szServices.Count(c => c.ParentGUID == pid && c.TableType == tableType));
        }
コード例 #3
0
        public int SearchOldManByBed(int hlmc, Guid welfareCentreId)
        {
            var szSrevices = new DbHelperEfSql <tbCustomer>();

            return(szSrevices.Count(c => c.IsValid == 1 && c.BedID != null && c.CustomerHLMC_dic == hlmc && c.WelfareCentreID == welfareCentreId));
        }
コード例 #4
0
        public int SearchOldManByBed(int hlmc)
        {
            var szSrevices = new DbHelperEfSql <tbCustomer>();

            return(szSrevices.Count(c => c.IsValid == 1 && c.BedID != null && c.CustomerHLMC_dic == hlmc));
        }
コード例 #5
0
        public int LaorenCount(Guid welfareCentreId)
        {
            var szSrevices = new DbHelperEfSql <tbCustomer>();

            return(szSrevices.Count(c => c.IsValid == 1 && c.BedID != null && c.WelfareCentreID == welfareCentreId));
        }
コード例 #6
0
        public bool ValidationBedByCustomer(Guid customerId, Guid bedId, Guid welfareCentreId)
        {
            var szServices = new DbHelperEfSql <tbCustomer>();

            return(szServices.Count(c => c.BedID == bedId && c.ID != customerId && c.IsValid == 1 && c.WelfareCentreID == welfareCentreId) <= 0);
        }
コード例 #7
0
        public int SearchByCustomerAge(int iAge1, int iAge2)
        {
            var szSrevices = new DbHelperEfSql <tbCustomer>();

            return(szSrevices.Count(c => c.IsValid == 1 && c.BedID != null && c.CustomerAge >= iAge1 && c.CustomerAge <= iAge2));
        }
コード例 #8
0
        public int SearchByCustomerHJDQ_dic(string customerHJDQ1, string customerHJDQ2)
        {
            var szSrevices = new DbHelperEfSql <tbCustomer>();

            return(szSrevices.Count(c => c.IsValid == 1 && c.BedID != null && c.CustomerHJDQ_dic != customerHJDQ1 && c.CustomerHJDQ_dic != customerHJDQ2));
        }
コード例 #9
0
        public int SearchByCustomerHJDQ_dic(string customerHJDQ, Guid welfareCentreId)
        {
            var szSrevices = new DbHelperEfSql <tbCustomer>();

            return(szSrevices.Count(c => c.IsValid == 1 && c.BedID != null && c.CustomerHJDQ_dic == customerHJDQ && c.WelfareCentreID == welfareCentreId));
        }
コード例 #10
0
        public int SearchByOldManType(int iType)
        {
            var szSrevices = new DbHelperEfSql <tbCustomer>();

            return(szSrevices.Count(c => c.IsValid == 1 && c.BedID != null && c.CustomerType_dic == iType));
        }
コード例 #11
0
        public int SearchOldManByYcType(int yslx)
        {
            var szSrevices = new DbHelperEfSql <tbCustomer>();

            return(szSrevices.Count(c => c.IsValid == 1 && c.BedID != null && c.CustomerYSLX_dic == yslx));
        }
コード例 #12
0
        public bool ValidationUserName(Guid id, string szUserName)
        {
            var szServices = new DbHelperEfSql <Users>();

            return(szServices.Count(c => c.UserName == szUserName && c.UserID != id) <= 0);
        }
コード例 #13
0
        public bool ValidationUserName(Guid id, string szUserName, Guid welfareCentreId)
        {
            var szServices = new DbHelperEfSql <Users>();

            return(szServices.Count(c => c.UserName == szUserName && c.UserID != id && c.WelfareCentreID == welfareCentreId && c.IsValid == 1) <= 0);
        }