public virtual void AgregarParticipante(Profesional profesional, Rol rol, DateTime?desde, DateTime?hasta) { Participantes.ToList <EstudioParticipante>().ForEach(delegate(EstudioParticipante estParticipante) { if (estParticipante.Profesional == profesional) { throw new ApplicationException(string.Format("El Participante {0} ya existe en el estudio {1}", profesional.NombreCompleto, this.Descripcion)); } }); EstudioParticipante estudioParticipante = new EstudioParticipante(); estudioParticipante.Estudio = this; estudioParticipante.Profesional = profesional; estudioParticipante.Rol = rol; if (desde.HasValue) { estudioParticipante.Desde = desde.Value; } if (hasta.HasValue) { estudioParticipante.Hasta = hasta.Value; } Participantes.Add(estudioParticipante); }
public virtual void AgregarParticipante(Profesional profesional) { ActaProfesional actaProfesional = new ActaProfesional(); actaProfesional.Acta = this; actaProfesional.Profesional = profesional; Participantes.Add(actaProfesional); }
public virtual RolComite ObtenerRolComiteParticipantes(Profesional profesional) { ActaProfesional actaProf = Participantes.ToList <ActaProfesional>().Find(delegate(ActaProfesional actaProfesional) { return(actaProfesional.Profesional.Id == profesional.Id); }); return(actaProf != null ? actaProf.RolComite : null); }
public override string ToString() { return(string.Format("[{2}] {0} - {1}", Rol.ToString(), Profesional.ToString(), this.GetType().Name)); }