Example #1
0
 public static void Update(AuditorInfo _AuditorInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "AuditorUpdate",
         new SqlParameter("@AuditorId", _AuditorInfo.AuditorId),
         new SqlParameter("@NombreAuditor", _AuditorInfo.NombreAuditor)
     );
 }
Example #2
0
 public static int Insert(AuditorInfo _AuditorInfo)
 {
     //Execute the query and return the new Guid
     object retval= _AdoHelper.ExecuteScalar(ConnectionString,"AuditorInsert",
         new SqlParameter("@NombreAuditor", _AuditorInfo.NombreAuditor)
     );
     return Int32.Parse(retval.ToString());
 }
Example #3
0
        /// <summary>
        /// Creates a new instance of the Auditor class and populates it with data from the specified SqlDataReader.
        /// </summary>
        private static AuditorInfo MakeAuditor(SqlDataReader dataReader)
        {
            AuditorInfo auditor = new AuditorInfo();

            if (dataReader.IsDBNull(AuditorId) == false)
                auditor.AuditorId = dataReader.GetInt32(AuditorId);
            if (dataReader.IsDBNull(NombreAuditor) == false)
                auditor.NombreAuditor = dataReader.GetString(NombreAuditor);

            return auditor;
        }