private void InitializeFromEntity(Centro c) { Nombre = c.Nombre; UniqueId = c.unique_id; Votantes = c.votantes ?? 0; CantidadMesas = c.mesas; Cuadernos = c.cuadernos ?? 0; Grupo = c.grupo; GrupoMovilizacion = c.grupoMovilizacion; GrupoQuickCount = c.qcGroup; Tag1 = c.tag1; Tag2 = c.tag2; Ubicacion = new UbicacionGeografica(c); Settings = new CentroSettings(c); EnlacesMovilizacion = c.Movilizadors.Select(m => new EnlaceMovilizacion(m)).ToList(); EnlacesExitPoll = c.TestigoExitPolls.Select(m => new EnlaceExitPoll(m)).ToList(); Alertas = new List <Alerta>(); Alertas.AddRange(c.ExitPollAlertas.Select(a => new Alerta(a))); Alertas.AddRange(c.MovilizacionAlertas.Select(a => new Alerta(a))); Alertas.AddRange(c.QuickCountAlertas.Select(a => new Alerta(a))); Mesas = c.Mesas1.Select(m => new Mesa(m)).ToList(); }
private void InitializeFromEntity(Centro c) { Nombre = c.Nombre; UniqueId = c.unique_id; Votantes = c.votantes ?? 0; CantidadMesas = c.mesas; Cuadernos = c.cuadernos ?? 0; Grupo = c.grupo; GrupoMovilizacion = c.grupoMovilizacion; GrupoQuickCount = c.qcGroup; Tag1 = c.tag1; Tag2 = c.tag2; Ubicacion = new UbicacionGeografica(c); Settings= new CentroSettings(c); EnlacesMovilizacion = c.Movilizadors.Select(m => new EnlaceMovilizacion(m)).ToList(); EnlacesExitPoll = c.TestigoExitPolls.Select(m => new EnlaceExitPoll(m)).ToList(); Alertas = new List<Alerta>(); Alertas.AddRange(c.ExitPollAlertas.Select(a => new Alerta(a))); Alertas.AddRange(c.MovilizacionAlertas.Select(a => new Alerta(a))); Alertas.AddRange(c.QuickCountAlertas.Select(a => new Alerta(a))); Mesas = c.Mesas1.Select(m => new Mesa(m)).ToList(); }