示例#1
0
 public static int Insert(AuditoriaCausaRaizInfo _AuditoriaCausaRaizInfo)
 {
     //Execute the query and return the new Guid
     object retval = _AdoHelper.ExecuteScalar(ConnectionString, "AuditoriaCausaRaizInsert",
         new SqlParameter("@Codigo", _AuditoriaCausaRaizInfo.Codigo),
         new SqlParameter("@Descripcion", _AuditoriaCausaRaizInfo.Descripcion)
     );
     return Int32.Parse(retval.ToString());
 }
示例#2
0
 public static void Delete(AuditoriaCausaRaizInfo _AuditoriaCausaRaizInfo)
 {
     try
     {
         _AdoHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, "AuditoriaCausaRaizDelete",
             new SqlParameter("@AuditoriaCausaRaizId", _AuditoriaCausaRaizInfo.AuditoriaCausaRaizId)
         );
     }
     catch (SqlException sqlEx)
     {
         if (sqlEx.Number != 547)
             throw;
     }
 }
示例#3
0
        /// <summary>
        /// Creates a new instance of the AuditoriaCausaRaiz class and populates it with data from the specified SqlDataReader.
        /// </summary>
        private static AuditoriaCausaRaizInfo MakeAuditoriaCausaRaiz(SqlDataReader dataReader)
        {
            AuditoriaCausaRaizInfo auditoriaCausaRaiz = new AuditoriaCausaRaizInfo();

            if (dataReader.IsDBNull(AuditoriaCausaRaizId) == false)
                auditoriaCausaRaiz.AuditoriaCausaRaizId = dataReader.GetInt32(AuditoriaCausaRaizId);
            if (dataReader.IsDBNull(Codigo) == false)
                auditoriaCausaRaiz.Codigo = dataReader.GetString(Codigo);
            if (dataReader.IsDBNull(Descripcion) == false)
                auditoriaCausaRaiz.Descripcion = dataReader.GetString(Descripcion);

            return auditoriaCausaRaiz;
        }
示例#4
0
 public static void Update(AuditoriaCausaRaizInfo _AuditoriaCausaRaizInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, "AuditoriaCausaRaizUpdate",
         new SqlParameter("@AuditoriaCausaRaizId", _AuditoriaCausaRaizInfo.AuditoriaCausaRaizId),
         new SqlParameter("@Codigo", _AuditoriaCausaRaizInfo.Codigo),
         new SqlParameter("@Descripcion", _AuditoriaCausaRaizInfo.Descripcion)
     );
 }