public ResultHandlerEntity(SqlDataReader reader)
 {
     IdResultHandler = (int)reader["IdResultHandler"];
     ResultHandlerName = (string)reader["ResultHandlerName"];
     IdMonitor = (int)reader["IdMonitor"];
     if (reader["IdProfile"] != DBNull.Value)
     {
         Profile = new Profile(reader);
     }
 }
Exemple #2
0
 public MonitorEntity(SqlDataReader reader)
 {
     IdMonitor = (int)reader["IdMonitor"];
     MonitorName = (string)reader["MonitorName"];
     Frequency = (TimeSpan)reader["Frequency"];
     LastRun = (DateTime)reader["LastRun"];
     IsActivated = (bool)reader["Activated"];
     if (reader["IdMonitor"] != DBNull.Value)
     {
         Profile = new Profile(reader);
     }
 }
        public void InsertProfile(Profile profile)
        {
            using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["AWSDatabase"].ConnectionString))
            {
                using (SqlCommand command = connection.CreateCommand())
                {
                    command.CommandText = @"
INSERT INTO 
    Profile (Login, Password, Alias)
VALUES 
    (@Login, @Password, @Alias)";
                    command.Parameters.AddParameter("@Login", SqlDbType.VarBinary, profile.EncryptedLogin);
                    command.Parameters.AddParameter("@Password", SqlDbType.VarBinary, profile.EncryptedPassword);
                    command.Parameters.AddParameter("@Alias", SqlDbType.VarChar, profile.Alias);

                    connection.Open();
                    command.ExecuteNonQuery();
                }
            }
        }
 public TaxesAuthentifier(Profile profile)
     : base(profile)
 {
 }
 public FreeMobileAuthentifier(Profile profile)
     :base(profile)
 {
 }
 public BaseAuthentifier(Profile profile)
 {
     this.Client = new SmartWebClient();
     this.Profile = profile;
 }
 public TennisAuthentifier(Profile profile)
     : base(profile)
 {
 }