public void AnyadirPremio(int p_Premio_OID, string p_asistente_OID) { DSMGenNHibernate.EN.DSM.PremioEN premioEN = null; try { SessionInitializeTransaction(); premioEN = (PremioEN)session.Load(typeof(PremioEN), p_Premio_OID); premioEN.Asistente = (DSMGenNHibernate.EN.DSM.AsistenteEN)session.Load(typeof(DSMGenNHibernate.EN.DSM.AsistenteEN), p_asistente_OID); premioEN.Asistente.Premio.Add(premioEN); session.Update(premioEN); SessionCommit(); } catch (Exception ex) { SessionRollBack(); if (ex is DSMGenNHibernate.Exceptions.ModelException) { throw ex; } throw new DSMGenNHibernate.Exceptions.DataLayerException("Error in PremioCAD.", ex); } finally { SessionClose(); } }
public override bool Equals(object obj) { if (obj == null) { return(false); } PremioEN t = obj as PremioEN; if (t == null) { return(false); } if (Id.Equals(t.Id)) { return(true); } else { return(false); } }
public PremioEN(PremioEN premio) { this.init(Id, premio.Descripcion, premio.Evento, premio.Nombre, premio.Asistente, premio.Grupo); }