Ejemplo n.º 1
0
 public static void Insert(DelegacionProvinciaInfo _DelegacionProvinciaInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString, "DelegacionProvinciaInsert",
         new SqlParameter("@Cod_Delegacion", _DelegacionProvinciaInfo.Cod_Delegacion),
         new SqlParameter("@Cod_Provincia", _DelegacionProvinciaInfo.Cod_Provincia),
         new SqlParameter("@Cod_APM", _DelegacionProvinciaInfo.Cod_APM)
     );
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new instance of the DelegacionProvincia class and populates it with data from the specified SqlDataReader.
        /// </summary>
        private static DelegacionProvinciaInfo MakeDelegacionProvincia(SqlDataReader dataReader)
        {
            DelegacionProvinciaInfo delegacionProvincia = new DelegacionProvinciaInfo();

            if (dataReader.IsDBNull(Cod_Delegacion) == false)
                delegacionProvincia.Cod_Delegacion = dataReader.GetInt32(Cod_Delegacion);
            if (dataReader.IsDBNull(Cod_Provincia) == false)
                delegacionProvincia.Cod_Provincia = dataReader.GetInt32(Cod_Provincia);
            if (dataReader.IsDBNull(Cod_APM) == false)
                delegacionProvincia.Cod_APM = dataReader.GetInt32(Cod_APM);

            return delegacionProvincia;
        }