private void OnFirePressed() { var character = GetCharacter(); var result = new FHitResult(); GetWorld().DebugDrawTraceTag = "drag&drop"; GetWorld().LineTraceSingleByChannel( result, character.GetCapsuleComponent().GetWorldLocation(), character.GetCapsuleComponent().GetWorldLocation() + GetControlRotation().Vector() * DragDropDistance, ECollisionChannel.ECC_Visibility, new FCollisionQueryParams(GetWorld().DebugDrawTraceTag, true, null), new FCollisionResponseParams(ECollisionResponse.ECR_Block) ); _pickUpObject = result.GetActor(); _dragDistance = result.Distance; if (_pickUpObject?.IsRootComponentMovable() == false) { _pickUpObject = null; } Ue.ScreenDebugMessage(result.GetActor()?.GetName()); }
// GET: /AddMatiere/Edit public ActionResult EditResponsable(int id = 0) { Ue ue = this.ueRepository.Get(id); if (ue == null) { return(HttpNotFound()); } /* if (ue.ResponsableUe.UserId != 0 && Roles.IsUserInRole(ue.ResponsableUe.UserName, "ResponsableUE")) * { * Roles.RemoveUserFromRole(ue.ResponsableUe.UserName, "ResponsableUE"); * Roles.AddUserToRole(ue.ResponsableUe.UserName, "Enseignant"); * }*/ /*if (ue.ResponsableUe != null) * { * Enseignant ens = this.respRepository.GetResp(ue.ResponsableUe.UserId); * } */ //Roles.RemoveUserFromRole(ens.UserName, "ResponsableUE"); // Roles.AddUserToRole(ens.UserName, "Enseignant"); IEnumerable <Enseignant> ensList = this.enseignantRepository.GetList(); ViewBag.enseignantList = ensList; if (!Request.IsAjaxRequest()) { return(View(ue)); } else { return(PartialView("_EditResponsable", ue)); } }
// GET: /Batiment/Delete/ public ActionResult DeleteUE(int id = 0) { Ue ue = ueRepository.Get(id); if (ue == null) { return(HttpNotFound()); } else { this.ueRepository.Delete(id); this.ueRepository.Save(); return(RedirectToAction("IndexUE")); } /* if (!Request.IsAjaxRequest()) * { * return View(batiment); * } * else * { * * return PartialView("_DeleteBatiment", batiment); * }*/ }
public MontarHistoricoEscolarQuery(Dre dre, Ue ue, IEnumerable <AreaDoConhecimento> areasConhecimento, IEnumerable <IGrouping <string, ComponenteCurricularPorTurma> > componentesCurricularesTurmas, IEnumerable <AlunoTurmasHistoricoEscolarDto> alunosTurmas, IEnumerable <MediaFrequencia> mediasFrequencia, IEnumerable <IGrouping <string, NotasAlunoBimestre> > notas, IEnumerable <IGrouping <string, FrequenciaAluno> > frequencias, IEnumerable <TipoNotaCicloAno> tiposNota, IEnumerable <TransferenciaDto> transferencias, string[] turmasCodigo, CabecalhoDto cabecalho, LegendaDto legenda, DadosDataDto dadosData, FuncionarioDto dadosDiretor, FuncionarioDto dadosSecretario, IEnumerable <IGrouping <long, UeConclusaoPorAlunoAno> > historicoUes, bool preencherDataImpressao, bool imprimirDadosResponsaveis) { Dre = dre; Ue = ue; AreasConhecimento = areasConhecimento; ComponentesCurricularesTurmas = componentesCurricularesTurmas; AlunosTurmas = alunosTurmas; TurmasCodigo = turmasCodigo; Cabecalho = cabecalho; HistoricoUes = historicoUes; Notas = notas; Frequencias = frequencias; MediasFrequencia = mediasFrequencia; TiposNota = tiposNota; Transferencias = transferencias; Legenda = legenda; DadosData = dadosData; DadosDiretor = dadosDiretor; DadosSecretario = dadosSecretario; PreencherDataImpressao = preencherDataImpressao; ImprimirDadosResponsaveis = imprimirDadosResponsaveis; }
private async Task <Guid> SolicitarRelatorioBimestral(int bimestre, Ue ue) { var filtro = new FiltroRelatorioFaltasFrequenciaDto() { AnoLetivo = DateTime.Now.Year, AnosEscolares = new[] { "-99" }, Bimestres = new List <int>() { bimestre }, Modalidade = Modalidade.Fundamental, CodigoDre = ue.Dre.CodigoDre, CodigoUe = ue.CodigoUe, ComponentesCurriculares = new List <string>() { "1060", "1061", "1322" }, TipoRelatorio = TipoRelatorioFaltasFrequencia.Ambos, Condicao = CondicoesRelatorioFaltasFrequencia.TodosEstudantes, TipoFormatoRelatorio = TipoFormatoRelatorio.Pdf, NomeUsuario = "Processo automático", CodigoRf = " - ", }; return(await mediator.Send(new SolicitaRelatorioFaltasFrequenciaCommand(filtro))); }
protected override void BeginPlay() { try { PrimaryActorTick.bCanEverTick = 1; _box = new UBoxComponent(this, "Simple Child"); _box.RegisterComponent(); var root = GetRootComponent(); var rootSm = root as UStaticMeshComponent; Ue.ScreenDebugMessage(rootSm?.GetFullName() ?? "null"); _box.AttachToComponent(root, FAttachmentTransformRules.SnapToTargetIncludingScale, ""); _box.SetCollisionProfileName("OverlapAll"); _box.SetBoxExtent(new FVector(100, 100, 100), false); _box.OnComponentEndOverlap += Box_OnComponentEndOverlap; } catch (Exception e) { Ue.LogError(e.ToString()); } }
public SalvarPendenciaCalendarioUeCommand(long tipoCalendarioId, Ue ue, string descricao, string instrucao, TipoPendencia tipoPendencia) { TipoCalendarioId = tipoCalendarioId; Ue = ue; Descricao = descricao; Instrucao = instrucao; TipoPendencia = tipoPendencia; }
public async Task <string> Executar(FiltroRelatorioSincronoDto request) { var filtros = request.ObterObjetoFiltro <FiltroRelatorioSondagemPortuguesCapacidadeLeituraDto>(); Dre dre = null; Ue ue = null; Usuario usuario = null; if (!string.IsNullOrEmpty(filtros.UeCodigo)) { ue = await mediator.Send(new ObterUePorCodigoQuery(filtros.UeCodigo)); if (ue == null) { throw new NegocioException("Não foi possível obter a UE."); } } if (filtros.DreCodigo > 0) { dre = await mediator.Send(new ObterDrePorCodigoQuery() { DreCodigo = filtros.DreCodigo.ToString() }); if (dre == null) { throw new NegocioException("Não foi possível obter a DRE."); } } if (!string.IsNullOrEmpty(filtros.UsuarioRf)) { usuario = await mediator.Send(new ObterUsuarioPorCodigoRfQuery() { UsuarioRf = filtros.UsuarioRf }); if (usuario == null) { throw new NegocioException("Não foi possível obter o usuário."); } } var relatorio = await mediator.Send(new ObterRelatorioSondagemPortuguesCapLeituraPorTurmaQuery() { AnoLetivo = filtros.AnoLetivo, Dre = dre, Ue = ue, TurmaAno = int.Parse(filtros.Ano), Usuario = usuario, TurmaCodigo = filtros.TurmaCodigo, Bimestre = filtros.Bimestre }); return(await mediator.Send(new GerarRelatorioHtmlParaPdfCommand("RelatorioSondagemPortuguesCapacidadeLeituraPorTurma", relatorio, Guid.NewGuid(), envioPorRabbit : false))); }
public ActionResult EditUE(Ue ue) { if (ModelState.IsValid) { ueRepository.Entry(ue); ueRepository.Save(); return(RedirectToAction("IndexUE")); } return(View(ue)); }
public RelatorioCompensacaoAusenciaObterResultadoFinalQuery(FiltroRelatorioCompensacaoAusenciaDto filtros, Ue ue, Dre dre, IEnumerable <ComponenteCurricularPorTurma> componentesCurriculares, IEnumerable <RelatorioCompensacaoAusenciaRetornoConsulta> compensacoes, IEnumerable <AlunoHistoricoEscolar> alunos, IEnumerable <FrequenciaAluno> frequencias) { Filtros = filtros; Ue = ue; Dre = dre; ComponentesCurriculares = componentesCurriculares; Compensacoes = compensacoes; Alunos = alunos; Frequencias = frequencias; }
private RelatorioImpressaoCalendarioDto MontarCabecalho(Dre dre, Ue ue, TipoCalendarioDto tipoCalendarioDto) { var retorno = new RelatorioImpressaoCalendarioDto(); retorno.DreNome = dre == null ? "TODAS" : dre.Abreviacao; retorno.TipoCalendarioNome = tipoCalendarioDto.Nome; retorno.UeNome = ue == null ? "TODAS" : ue.NomeComTipoEscola; return(retorno); }
private BoletimEscolarCabecalhoDto ObterCabecalhoInicial(Dre dre, Ue ue, Turma turma) { return(new BoletimEscolarCabecalhoDto() { Data = DateTime.Now.ToString("dd/MM/yyyy"), NomeDre = dre.Abreviacao, NomeUe = ue.NomeRelatorio, NomeTurma = turma.NomeRelatorio }); }
public ObterRelatorioImpressaoCalendarioQuery(Dre dre, Ue ue, TipoCalendarioDto tipoCalendario, bool ehSME, string usuarioRF, Guid usuarioPerfil, bool consideraPendenteAprovacao, bool podeVisualizarEventosOcorrenciaDre) { Dre = dre; Ue = ue; TipoCalendario = tipoCalendario; EhSME = ehSME; UsuarioRF = usuarioRF; UsuarioPerfil = usuarioPerfil; ConsideraPendenteAprovacao = consideraPendenteAprovacao; PodeVisualizarEventosOcorrenciaDre = podeVisualizarEventosOcorrenciaDre; }
public ActionResult CreateUE(Ue ue) { if (ModelState.IsValid) { this.ueRepository.Insert(ue); this.ueRepository.Save(); return(RedirectToAction("IndexUE")); } return(View(ue)); }
public static string MyTestMethod(string arguments) { try { Ue.ScreenDebugMessage($"epepeep"); return($"The string have {arguments.Length} symbols!"); } catch (Exception e) { return(e.ToString()); } }
private async Task <IEnumerable <long> > ObterUsuariosAdms(Ue ue) { var adms = await mediator.Send(new ObterFuncionariosDreOuUePorPerfisQuery(ue.CodigoUe, ObterPerfis())); var listaUsuarios = new List <long>(); foreach (var adm in adms) { listaUsuarios.Add(await mediator.Send(new ObterUsuarioIdPorRfOuCriaQuery(adm))); } return(listaUsuarios); }
private FechamentoReabertura TransformarDtoEmEntidadeParaPersistencia(FechamentoReaberturaPersistenciaDto fechamentoReaberturaPersistenciaDto) { Dre dre = null; Ue ue = null; if (!string.IsNullOrEmpty(fechamentoReaberturaPersistenciaDto.DreCodigo)) { dre = repositorioDre.ObterPorCodigo(fechamentoReaberturaPersistenciaDto.DreCodigo); if (dre == null) { throw new NegocioException("Não foi possível localizar a Dre."); } } if (!string.IsNullOrEmpty(fechamentoReaberturaPersistenciaDto.UeCodigo)) { ue = repositorioUe.ObterPorCodigo(fechamentoReaberturaPersistenciaDto.UeCodigo); if (ue == null) { throw new NegocioException("Não foi possível localizar a UE."); } } var tipoCalendario = repositorioTipoCalendario.ObterPorId(fechamentoReaberturaPersistenciaDto.TipoCalendarioId); if (tipoCalendario == null) { throw new NegocioException("Não foi possível localizar o Tipo de Calendário."); } var fechamentoReabertura = new FechamentoReabertura() { Descricao = fechamentoReaberturaPersistenciaDto.Descricao, Fim = fechamentoReaberturaPersistenciaDto.Fim, Inicio = fechamentoReaberturaPersistenciaDto.Inicio }; fechamentoReabertura.AtualizarDre(dre); fechamentoReabertura.AtualizarUe(ue); fechamentoReabertura.AtualizarTipoCalendario(tipoCalendario); fechamentoReaberturaPersistenciaDto.Bimestres.ToList().ForEach(bimestre => { fechamentoReabertura.Adicionar(new FechamentoReaberturaBimestre() { Bimestre = bimestre }); }); return(fechamentoReabertura); }
private async Task EnviarRelatorio(Guid codigoRelatorio, Ue ue, PeriodoEscolar periodoEscolarEncerrado) { var componentesUe = await VerificaComponentesUe(ue); var siglasComponentesUe = ObterSiglasComponentes(componentesUe); var nomesComponentesUe = OterNomesComponentes(componentesUe); var descricaoUe = $"{ue.TipoEscola.ShortName()} {ue.Nome} ({ue.Dre.Abreviacao})"; var titulo = $"Validação bimestral de frequência {siglasComponentesUe} - {periodoEscolarEncerrado.Bimestre}º Bimestre - {descricaoUe}"; var mensagem = $"Segue o relatório de frequência dos componentes de {nomesComponentesUe} do <b>{periodoEscolarEncerrado.Bimestre}º Bimestre</b> da <b>{descricaoUe}</b> para sua validação.<br/><br/>Clique no botão abaixo para fazer o download do arquivo.<br/><br/>"; mensagem += await MontarBotaoDownload(codigoRelatorio); await mediator.Send(new EnviarNotificacaoCommand(titulo, mensagem, NotificacaoCategoria.Workflow_Aprovacao, NotificacaoTipo.Frequencia, ObterCargos(), ue.Dre.CodigoDre, ue.CodigoUe)); }
private async Task GerarPendenciaCalendarioUe(Ue ue, int diasLetivos, long tipoCalendarioId) { var nomeTipoCalendario = await mediator.Send(new ObterNomeTipoCalendarioPorIdQuery(tipoCalendarioId)); var descricao = new StringBuilder(); descricao.AppendLine($"<i>DRE:</i><b> DRE - {ue.Dre.Abreviacao}</b><br />"); descricao.AppendLine($"<i>UE:</i><b> {ue.TipoEscola.ShortName()} - {ue.Nome}</b><br />"); descricao.AppendLine($"<i>Calendário:</i><b> {nomeTipoCalendario}</b><br />"); descricao.AppendLine($"<i>Quantidade de dias letivos:</i><b> {diasLetivos}</b><br />"); var instrucao = "Acesse a tela de Calendário Escolar e confira os eventos da sua UE."; await mediator.Send(new SalvarPendenciaCalendarioUeCommand(tipoCalendarioId, ue, descricao.ToString(), instrucao, TipoPendencia.CalendarioLetivoInsuficiente)); }
private async Task <long> GerarPendenciaCalendarioUe(long tipoCalendarioId, Ue ue) { var nomeTipoCalendario = await mediator.Send(new ObterNomeTipoCalendarioPorIdQuery(tipoCalendarioId)); var descricao = new StringBuilder(); descricao.AppendLine($"<i>DRE:</i><b> DRE - {ue.Dre.Abreviacao}</b><br />"); descricao.AppendLine($"<i>UE:</i><b> {ue.TipoEscola.ShortName()} - {ue.Nome}</b><br />"); descricao.AppendLine($"<i>Calendário:</i><b> {nomeTipoCalendario}</b><br />"); descricao.AppendLine($"<i>Eventos pendentes de cadastro:</i><br />"); var instrucao = "Acesse a tela de Eventos e realize o cadastro dos eventos relatados acima."; return(await mediator.Send(new SalvarPendenciaCalendarioUeCommand(tipoCalendarioId, ue, descricao.ToString(), instrucao, TipoPendencia.CadastroEventoPendente))); }
private async Task NotificarUe(Ue ue, ModalidadeTipoCalendario modalidadeTipoCalendario) { var anoAtual = DateTime.Now.Year; var descricaoUe = $"{ue.TipoEscola.ShortName()} {ue.Nome} ({ue.Dre.Abreviacao})"; var titulo = $"Cadastro de período de fechamento pendente {descricaoUe}"; var mensagem = $"O período de fechamento da <b>{descricaoUe}</b> ainda não foi cadastrado para o tipo de calendário <b>{modalidadeTipoCalendario.Name()} {anoAtual}</b>."; await mediator.Send(new EnviarNotificacaoCommand(titulo, mensagem, NotificacaoCategoria.Aviso, NotificacaoTipo.Calendario, ObterCargosGestaoEscola(), ue.Dre.CodigoDre, ue.CodigoUe)); var admins = await ObterUsuariosAdms(ue); if (admins != null && admins.Any()) { await mediator.Send(new EnviarNotificacaoUsuariosCommand(titulo, mensagem, NotificacaoCategoria.Aviso, NotificacaoTipo.Calendario, admins, ue.Dre.CodigoDre, ue.CodigoUe)); } }
private async Task <IEnumerable <long> > ObterFuncionarios(Ue ue) { var funcionarios = await servicoEol.ObterFuncionariosPorUe(new BuscaFuncionariosFiltroDto() { CodigoUE = ue.CodigoUe }); var listaUsuarios = new List <long>(); foreach (var funcionario in funcionarios) { listaUsuarios.Add(await mediator.Send(new ObterUsuarioIdPorRfOuCriaQuery(funcionario.CodigoRf))); } return(listaUsuarios); }
private async Task <IEnumerable <long> > ObterProfessores(Ue ue) { var professores = await mediator.Send(new ObterProfessoresDreOuUeAnoLetivoQuery(ue.CodigoUe, DateTime.Now.Year)); var listaUsuarios = new List <long>(); foreach (var professor in professores.Select(c => c.CodigoRF).Distinct()) { if (professor != "") { listaUsuarios.Add(await mediator.Send(new ObterUsuarioIdPorRfOuCriaQuery(professor))); } } return(listaUsuarios.Distinct()); }
private (Dre, Ue) ObterDreEUe(string codigoDre, string codigoUe) { Dre dre = null; if (!string.IsNullOrWhiteSpace(codigoDre)) { dre = repositorioDre.ObterPorCodigo(codigoDre.ToString()); } Ue ue = null; if (!string.IsNullOrWhiteSpace(codigoUe)) { ue = repositorioUe.ObterPorCodigo(codigoUe.ToString()); } return(dre, ue); }
private async Task NotificarUe(Ue ue, PeriodoEscolar periodoEscolar, PeriodoFechamentoBimestre periodoFechamentoBimestre) { var descricaoUe = $"{ue.TipoEscola.ShortName()} {ue.Nome} ({ue.Dre.Abreviacao})"; var titulo = $"Início do período de fechamento do {periodoEscolar.Bimestre}º bimestre - {descricaoUe}"; var mensagem = $@"O fechamento do <b>{periodoEscolar.Bimestre}º bimestre</b> na <b>{descricaoUe}</b> irá iniciar no dia <b>{periodoFechamentoBimestre.InicioDoFechamento.Date.ToString("dd/MM/yyyy")}</b>."; var usuarios = await ObterUsuarios(ue); if (usuarios != null && usuarios.Any()) { await mediator.Send(new EnviarNotificacaoUsuariosCommand(titulo, mensagem, NotificacaoCategoria.Aviso, NotificacaoTipo.Calendario, usuarios, ue.Dre.CodigoDre, ue.CodigoUe)); } await mediator.Send(new EnviarNotificacaoCommand(titulo, mensagem.ToString(), NotificacaoCategoria.Aviso, NotificacaoTipo.Calendario, ObterCargosGestaoEscola(), periodoFechamentoBimestre.PeriodoFechamento.Ue.Dre.CodigoDre, periodoFechamentoBimestre.PeriodoFechamento.Ue.CodigoUe)); }
// GET: /Responsable/Details/5 public ActionResult DetailsResponsable(int id = 0) { Ue ue = ueRepository.Get(id); if (ue == null) { return(HttpNotFound()); } if (!Request.IsAjaxRequest()) { return(View(ue)); } else { return(PartialView("_DetailsResponsable", ue)); } }
//Get public ActionResult EditUE(int id = 0) { Ue ue = ueRepository.Get(id); if (ue == null) { return(HttpNotFound()); } if (!Request.IsAjaxRequest()) { return(View(ue)); } else { return(PartialView("_EditUE", ue)); } }
private async Task <IEnumerable <long> > ObterCargosGestaoEscola(Ue ue) { var usuarios = await mediator.Send(new ObterFuncionariosDreOuUePorPerfisQuery(ue.CodigoUe, new List <Guid> { Perfis.PERFIL_AD, Perfis.PERFIL_CP, Perfis.PERFIL_DIRETOR })); var listaUsuarios = new List <long>(); foreach (var usuario in usuarios.Distinct()) { if (usuario != "") { listaUsuarios.Add(await mediator.Send(new ObterUsuarioIdPorRfOuCriaQuery(usuario))); } } return(listaUsuarios.Distinct()); }
private async Task <BoletimEscolarDto> MontarBoletins(Dre dre, Ue ue, IEnumerable <Turma> turmas, IEnumerable <IGrouping <string, ComponenteCurricularPorTurma> > componentesCurricularesPorTurma, IEnumerable <IGrouping <string, Aluno> > alunosPorTurma, IEnumerable <IGrouping <string, NotasAlunoBimestre> > notasAlunos, IEnumerable <IGrouping <string, FrequenciaAluno> > frequenciasAlunos, IDictionary <string, string> tiposNota, IEnumerable <MediaFrequencia> mediasFrequencias) { return(await mediator.Send(new MontarBoletinsQuery() { Dre = dre, Ue = ue, Turmas = turmas, ComponentesCurricularesPorTurma = componentesCurricularesPorTurma, AlunosPorTuma = alunosPorTurma, Notas = notasAlunos, Frequencias = frequenciasAlunos, TiposNota = tiposNota, MediasFrequencia = mediasFrequencias })); }
public async Task Executar(FiltroRelatorioDto request) { var filtros = request.ObterObjetoFiltro <RelatorioImpressaoCalendarioFiltroDto>(); Dre dre = null; if (!string.IsNullOrEmpty(filtros.DreCodigo)) { dre = await mediator.Send(new ObterDrePorCodigoQuery() { DreCodigo = filtros.DreCodigo }); if (dre == null) { throw new NegocioException("Não foi possível localizar a Dre"); } } Ue ue = null; if (!string.IsNullOrEmpty(filtros.UeCodigo)) { ue = await mediator.Send(new ObterUePorCodigoQuery(filtros.UeCodigo)); if (ue == null) { throw new NegocioException("Não foi possível localizar a Ue"); } } var tipoCalendario = await mediator.Send(new ObterTipoCalendarioPorIdQuery(filtros.TipoCalendarioId)); if (tipoCalendario == null) { throw new NegocioException("Não foi possível localizar o Tipo de Calendário."); } var relatorio = await mediator.Send(new ObterRelatorioImpressaoCalendarioQuery(dre, ue, tipoCalendario, filtros.EhSME, filtros.UsuarioRF, filtros.UsuarioPerfil, filtros.ConsideraPendenteAprovacao, filtros.PodeVisualizarEventosOcorrenciaDre)); await mediator.Send(new GerarRelatorioHtmlParaPdfCommand("RelatorioImpressaoCalendario", relatorio, request.CodigoCorrelacao)); }
public void Edit(Ue m) { this.context.Entry(m).State = EntityState.Modified; }
public void Entry(Ue u) { this.context.Entry(u).State = System.Data.EntityState.Modified; }
public ActionResult CreateUE(Ue ue) { if (ModelState.IsValid) { this.ueRepository.Insert(ue); this.ueRepository.Save(); return RedirectToAction("IndexUE"); } return View(ue); }
public ActionResult EditResponsable(Ue ue) { string name = null; Ue m = this.ueRepository.Get(ue.Id); int id = ue.ResponsableUe.UserId; Enseignant ens = this.enseignantRepository.Get(id); ResponsableUE resp = new ResponsableUE(); resp.UserName = ens.UserName; resp.Name = ens.Name; resp.FirstName = ens.FirstName; resp.Tel = ens.Tel; resp.ResponsableDepuis = DateTime.Parse("10/01/2009"); resp.Enseignements = ens.Enseignements; m.ResponsableUe = resp; //ens.UserName = ens.UserName + "_"; // this.enseignantRepository.Save(); // this.respRepository.Insert(resp); /* Roles.AddUserToRole(resp.UserName, "ResponsableUE"); WebSecurity.CreateAccount(resp.UserName, resp.UserName);*/ // WebSecurity.CreateAccount(resp.UserName, resp.UserName); /*if (m.ResponsableUe != null ) { System.Diagnostics.Debug.WriteLine("T1"); name = m.ResponsableUe.UserName; m.ResponsableUe = this.respRepository.GetEns(ue.ResponsableUe.UserId); /* Roles.AddUserToRole(ue.ResponsableUe.UserName, "ResponsableUE"); System.Diagnostics.Debug.WriteLine("m.ResponsableUe.UserName" + m.ResponsableUe.UserName); Roles.RemoveUserFromRole(ue.ResponsableUe.UserName, "Enseignant"); Roles.AddUserToRole(m.ResponsableUe.UserName, "Enseignant"); Roles.RemoveUserFromRole(m.ResponsableUe.UserName, "ResponsableUE"); System.Diagnostics.Debug.WriteLine("ue.ResponsableUe.UserName" + ue.ResponsableUe.UserName); } else { System.Diagnostics.Debug.WriteLine("T2"); m.ResponsableUe = this.respRepository.GetEns(ue.ResponsableUe.UserId); name = m.ResponsableUe.UserName; }*/ if (ModelState.IsValid) { this.ueRepository.Edit(m); this.ueRepository.Save(); return RedirectToAction("IndexResponsable"); } return View(ue); }
public ActionResult EditUE(Ue ue) { if (ModelState.IsValid) { ueRepository.Entry(ue); ueRepository.Save(); return RedirectToAction("IndexUE"); } return View(ue); }