Пример #1
0
 public static int Insert(AuditoriaAuditorInfo _AuditoriaAuditorInfo)
 {
     //Execute the query and return the new Guid
     object retval = _AdoHelper.ExecuteScalar(ConnectionString, "AuditoriaAuditorInsert",
         new SqlParameter("@AuditoriaId", _AuditoriaAuditorInfo.AuditoriaId),
         new SqlParameter("@AuditorId", _AuditoriaAuditorInfo.AuditorId),
         new SqlParameter("@EsLider", _AuditoriaAuditorInfo.EsLider)
     );
     return Int32.Parse(retval.ToString());
 }
Пример #2
0
 public static void Delete(AuditoriaAuditorInfo _AuditoriaAuditorInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, "AuditoriaAuditorDelete",
         new SqlParameter("@AuditoriaAuditorId", _AuditoriaAuditorInfo.AuditoriaAuditorId)
     );
 }
Пример #3
0
        /// <summary>
        /// Creates a new instance of the AuditoriaAuditor class and populates it with data from the specified SqlDataReader.
        /// </summary>
        private static AuditoriaAuditorInfo MakeAuditoriaAuditor(SqlDataReader dataReader)
        {
            AuditoriaAuditorInfo auditoriaAuditor = new AuditoriaAuditorInfo();

            if (dataReader.IsDBNull(AuditoriaAuditorId) == false)
                auditoriaAuditor.AuditoriaAuditorId = dataReader.GetInt32(AuditoriaAuditorId);
            if (dataReader.IsDBNull(AuditoriaId) == false)
                auditoriaAuditor.AuditoriaId = dataReader.GetInt32(AuditoriaId);
            if (dataReader.IsDBNull(AuditorId) == false)
                auditoriaAuditor.AuditorId = dataReader.GetInt32(AuditorId);
            if (dataReader.IsDBNull(EsLider) == false)
                auditoriaAuditor.EsLider = dataReader.GetBoolean(EsLider);

            return auditoriaAuditor;
        }