示例#1
0
 public Model_Users CheckLoginUserExternal(string strUserName, UserLoginChannel loginChannel)
 {
     using (SqlConnection cn = new SqlConnection(this.ConnectionString))
     {
         SqlCommand cmd = new SqlCommand("SELECT * FROM Users WHERE UserName=@UserName AND UserCatId=1 ", cn);
         cmd.Parameters.Add("@UserName", SqlDbType.VarChar).Value = strUserName;
         //cmd.Parameters.Add("@UserLoginChannel", SqlDbType.TinyInt).Value = loginChannel;
         cn.Open();
         IDataReader reader = ExecuteReader(cmd, CommandBehavior.SingleRow);
         if (reader.Read())
         {
             return(MappingObjectFromDataReaderByName(reader));
         }
         else
         {
             return(null);
         }
     }
 }
示例#2
0
    public static Model_Users UserCheckloginExternal(string user, UserLoginChannel loginchannel)
    {
        Model_Users u = new Model_Users();

        return(u.CheckLoginUserExternal(user, loginchannel));
    }