public ActionResult Edit(int id) { var member = _afiliadoRepo.GetById(id); var model = new EditAfiliadoModel { Active = _afiliadoRepo.ActiveUserLabel(member.statusAfiliado), Address = member.direccionAfiliado, City = member.idCiudad, Country = member.idPais, Email = member.emailAfiliado, IdAfiliado = member.idAfiliado, Name = member.nombreAfiliado, State = member.idEstado, UserType = _afiliadoRepo.UserTypeLabel(member.raizVal), ConfirmPassword = member.passwordAfiliado, Password = member.passwordAfiliado }; ViewBag.Active = _afiliadoRepo.GetActiveMemberList(member.statusAfiliado); ViewBag.UserType = _afiliadoRepo.GetMemberTypeList(member.raizVal); ViewBag.Country = _paisRepo.GetCountries(member.idPais); ViewBag.City = _ciudadRepo.GetCities(member.idCiudad); ViewBag.State = _estadoRepo.GetStates(member.idEstado); return(View(model)); }
public ActionResult Edit(int id) { var evento = _eventoRepository.GetById(id); var model = new EditEventoModel { Active = _eventoRepository.GetActiveEventLabel(evento.activo), Address = evento.direccion, City = evento.idCiudad, Country = evento.idPais, State = evento.idEstado, Category = evento.idCategoria, Name = evento.nombreEvento, StartDate = evento.fechaInicio.ToShortDateString(), EndDate = evento.fechaExpiracion.ToShortDateString(), Description = evento.descripcion, IdEvento = evento.idEvento }; ViewBag.Active = _eventoRepository.GetActiveCategoryList(evento.activo); ViewBag.Category = _categoriaRepository.GetCategories(evento.idCategoria); ViewBag.Country = _paisRepo.GetCountries(evento.idPais); ViewBag.City = _ciudadRepo.GetCities(evento.idCiudad); ViewBag.State = _estadoRepo.GetStates(evento.idEstado); return(View(model)); }