public SendMail.Model.ComunicazioniMapping.ComAllegato GetById(long id) { SendMail.Model.ComunicazioniMapping.ComAllegato alleg = null; using (OracleCommand oCmd = base.CurrentConnection.CreateCommand()) { oCmd.CommandText = "SELECT ID_ALLEGATO" + ", REF_ID_COM" + ", ALLEGATO_TPU" + ", ALLEGATO_FILE" + ", ALLEGATO_EXT" + ", FLG_INS_PROT" + ", FLG_PROT_TO_UPL" //+ ", PROT_REF" + ", ALLEGATO_NAME FROM COMUNICAZIONI_ALLEGATI WHERE ID_ALLEGATO = " + id; try { using (OracleDataReader r = oCmd.ExecuteReader(System.Data.CommandBehavior.SingleRow)) { while (r.Read()) { alleg = SendMail.Data.Utilities.DaoOracleDbHelper.MapToAllegatoComunicazione(r); } } } catch { } } return(alleg); }
public void Update(SendMail.Model.ComunicazioniMapping.ComAllegato entity) { using (OracleCommand oCmd = base.CurrentConnection.CreateCommand()) { oCmd.CommandText = cmdUpdateAllegato; oCmd.Parameters.Add("p_allegato_file", entity.AllegatoFile); oCmd.Parameters.Add("p_allegato_ext", entity.AllegatoExt); oCmd.Parameters.Add("p_id_allegato", entity.IdAllegato.Value); try { oCmd.ExecuteNonQuery(); } catch { throw; } } }
public void Insert(SendMail.Model.ComunicazioniMapping.ComAllegato entity) { throw new NotImplementedException(); }