Example #1
0
 private void GetPasswordWithFormat(string username, bool updateLastLoginActivityDate, out int status, out string password, out int passwordFormat, out string passwordSalt, out int failedPasswordAttemptCount, out int failedPasswordAnswerAttemptCount, out bool isApproved, out DateTime lastLoginDate, out DateTime lastActivityDate)
 {
     password                         = null;
     passwordFormat                   = 0;
     passwordSalt                     = null;
     failedPasswordAttemptCount       = 0;
     failedPasswordAnswerAttemptCount = 0;
     isApproved                       = false;
     lastLoginDate                    = DateTime.Now;
     lastActivityDate                 = DateTime.Now;
     status = -1;
     System.Data.Common.DbCommand storedProcCommand = this.database.GetStoredProcCommand("aspnet_Membership_GetPasswordWithFormat");
     this.database.AddInParameter(storedProcCommand, "UserName", System.Data.DbType.String, username);
     this.database.AddInParameter(storedProcCommand, "UpdateLastLoginActivityDate", System.Data.DbType.Boolean, updateLastLoginActivityDate);
     this.database.AddInParameter(storedProcCommand, "CurrentTime", System.Data.DbType.DateTime, DateTime.Now);
     using (System.Data.IDataReader dataReader = this.database.ExecuteReader(storedProcCommand))
     {
         if (dataReader.Read())
         {
             password                         = dataReader.GetString(0);
             passwordFormat                   = dataReader.GetInt32(1);
             passwordSalt                     = dataReader.GetString(2);
             failedPasswordAttemptCount       = dataReader.GetInt32(3);
             failedPasswordAnswerAttemptCount = dataReader.GetInt32(4);
             isApproved                       = dataReader.GetBoolean(5);
             lastLoginDate                    = dataReader.GetDateTime(6);
             lastActivityDate                 = dataReader.GetDateTime(7);
             status = 0;
         }
     }
 }
Example #2
0
 public DateTime PreencheAtributo(System.Data.IDataReader lDataReader, int NumeroColuna, System.DateTime Atributo)
 {
     if ((lDataReader.IsDBNull(NumeroColuna) == true))
     {
         return(DateTime.MinValue);
     }
     else
     {
         return(lDataReader.GetDateTime(NumeroColuna));
     }
 }
Example #3
0
        //---------------------------------------------------------------------------------------------------------------------

        public void LoadRegistrationInfo()
        {
            string sql = String.Format("SELECT reg_origin, reg_date FROM usrreg WHERE id_usr={0};", this.Id);

            System.Data.IDbConnection dbConnection = context.GetDbConnection();
            System.Data.IDataReader   reader       = context.GetQueryResult(sql, dbConnection);
            if (reader.Read())
            {
                if (reader.GetValue(0) != DBNull.Value)
                {
                    RegistrationOrigin = reader.GetString(0);
                }
                if (reader.GetValue(1) != DBNull.Value)
                {
                    RegistrationDate = reader.GetDateTime(1);
                }
            }
            context.CloseQueryResult(reader, dbConnection);
        }
Example #4
0
 public DateTime GetDateTime(int i)
 {
     return(_innerReader.GetDateTime(i));
 }