Esempio n. 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);
            }
        }
Esempio n. 2
0
        public int Count(Guid pid, int tableType)
        {
            var szServices = new DbHelperEfSql <Attachments>();

            return(szServices.Count(c => c.ParentGUID == pid && c.TableType == tableType));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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);
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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);
        }
Esempio n. 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);
        }