Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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 }));
        }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
        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);
        }