Пример #1
0
 public static int Insert(AuditoriaControlInfo _AuditoriaControlInfo)
 {
     //Execute the query and return the new Guid
     object retval = _AdoHelper.ExecuteScalar(ConnectionString, "AuditoriaControlInsert",
         new SqlParameter("@Descripcion", _AuditoriaControlInfo.Descripcion),
         new SqlParameter("@Activo", _AuditoriaControlInfo.Activo),
         new SqlParameter("@DMS", _AuditoriaControlInfo.DMS),
         new SqlParameter("@Area", _AuditoriaControlInfo.Area)
     );
     return Int32.Parse(retval.ToString());
 }
Пример #2
0
        /// <summary>
        /// Creates a new instance of the AuditoriaControl class and populates it with data from the specified SqlDataReader.
        /// </summary>
        private static AuditoriaControlInfo MakeAuditoriaControl(SqlDataReader dataReader)
        {
            AuditoriaControlInfo auditoriaControl = new AuditoriaControlInfo();

            if (dataReader.IsDBNull(AuditoriaControlId) == false)
                auditoriaControl.AuditoriaControlId = dataReader.GetInt32(AuditoriaControlId);
            if (dataReader.IsDBNull(Descripcion) == false)
                auditoriaControl.Descripcion = dataReader.GetString(Descripcion);
            if (dataReader.IsDBNull(Activo) == false)
                auditoriaControl.Activo = dataReader.GetBoolean(Activo);
            if (dataReader.IsDBNull(DMS) == false)
                auditoriaControl.DMS = dataReader.GetBoolean(DMS);
            if (dataReader.IsDBNull(Area) == false)
                auditoriaControl.Area = dataReader.GetString(Area);

            return auditoriaControl;
        }
Пример #3
0
 public static void Delete(AuditoriaControlInfo _AuditoriaControlInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, "AuditoriaControlDelete",
         new SqlParameter("@AuditoriaControlId", _AuditoriaControlInfo.AuditoriaControlId)
     );
 }
Пример #4
0
 public static void Update(AuditoriaControlInfo _AuditoriaControlInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, "AuditoriaControlUpdate",
         new SqlParameter("@AuditoriaControlId", _AuditoriaControlInfo.AuditoriaControlId),
         new SqlParameter("@Descripcion", _AuditoriaControlInfo.Descripcion),
         new SqlParameter("@Activo", _AuditoriaControlInfo.Activo),
         new SqlParameter("@DMS", _AuditoriaControlInfo.DMS),
         new SqlParameter("@Area", _AuditoriaControlInfo.Area)
     );
 }