コード例 #1
0
ファイル: AccountDBOperate.cs プロジェクト: shenbo1/company
        public static bool GetAccountByMobile(string mobile, int role)
        {
            string sql = "select COUNT(0) from Account (nolock) where IsDeleted=0 and Mobile=@mobile and Role=@role;";

            return(DBAccess.ExecuteSql <int>(sql, new { mobile = mobile, role = role }) > 0);
        }
コード例 #2
0
ファイル: AccountDBOperate.cs プロジェクト: shenbo1/company
        public static Account LoginByMobileOrEmail(string name)
        {
            string sql = "select * from Account (nolock) where IsDeleted=0 and ( Email=@name or Mobile=@name);";

            return(DBAccess.GetEntityFirstOrDefault <Account>(sql, new { name = name }));
        }
コード例 #3
0
ファイル: AccountDBOperate.cs プロジェクト: shenbo1/company
        public static Account GetModelByName(string Name)
        {
            string sql = string.Format(@"select [Mobile],[Email],[Password],[IsDeleted],[CreateDate],[CreateBy],[ModifyBy],[Role],[Id],[AccountName],[Mobile],[Email],[Password],[IsDeleted],[CreateDate],[CreateBy],[ModifyBy],[Role],[Id],[AccountName] from {0} (nolock) where Name=@Name", TableName);

            return(DBAccess.GetEntityByName <Account>(sql, Name));
        }
コード例 #4
0
ファイル: AccountDBOperate.cs プロジェクト: shenbo1/company
        public static bool GetAccountByEmail(string email, int role)
        {
            string sql = "select COUNT(0) from Account (nolock) where IsDeleted=0 and Email=@email and Role=@role;";

            return(DBAccess.ExecuteSql <int>(sql, new { email = email, role = role }) > 0);
        }