/// <summary> /// Marca o projeto do aluno como excluido /// </summary> /// <param name="ahp"></param> /// <returns></returns> public static bool Excluir(ACA_AlunoHistoricoProjeto ahp) { ACA_AlunoHistoricoProjetoDAO dao = new ACA_AlunoHistoricoProjetoDAO(); dao._Banco.Open(IsolationLevel.ReadCommitted); try { if (VerificaHistorico(ahp.alu_id, ahp.ahp_id)) { throw new ValidationException((string)CustomResource.GetGlobalResourceObject("BLL", "ACA_AlunoHistoricoProjetoBO.ProjetoEmUsoHistorico")); } return(Save(ahp, dao._Banco)); } catch (Exception ex) { dao._Banco.Close(ex); throw; } finally { dao._Banco.Close(); } }
/// <summary> /// Carrega o quadro de horários /// </summary> private void CarregarQuadro() { // Recupera os dados da turma DataTable dtTurma = TUR_TurmaBO.SelectBY_tur_id(VS_tur_id, __SessionWEB.__UsuarioWEB.Usuario.ent_id); string turma = dtTurma.Rows[0]["tur_codigo"].ToString(); string escola = dtTurma.Rows[0]["tur_escolaUnidade"].ToString(); string calendario = dtTurma.Rows[0]["tur_calendario"].ToString(); string curso = dtTurma.Rows[0]["tur_curso"].ToString(); string turno = dtTurma.Rows[0]["tur_turno"].ToString(); Type objType = typeof(eDiasSemana); FieldInfo[] propriedades = objType.GetFields(); foreach (FieldInfo objField in propriedades) { DescriptionAttribute[] attributes = (DescriptionAttribute[])objField.GetCustomAttributes(typeof(DescriptionAttribute), false); if (attributes.Length > 0) { hdnDiasSemana.Value += CustomResource.GetGlobalResourceObject("Enumerador", attributes[0].Description) + ";"; } } UCComboTipoHorario.Carregar(); UCCTurmaDisciplina.CarregarTurmaDisciplina(VS_tur_id, true); UCCTurmaDisciplina.PermiteEditar = false; VS_lstTurmaHorario = TUR_TurmaHorarioBO.SelecionaPorTurma(VS_tur_id); CarregarCalendario(); lblDados.Text = string.Format(CustomResource.GetGlobalResourceObject("Turma", "Turma.QuadroHorarios.lblDados.Text"), turma, escola, calendario, curso, turno); }
private void UCBuscaDocenteTurma_IndexChanged_Turma() { try { UCComboTurmaDisciplina.Valor = -1; UCComboTurmaDisciplina.PermiteEditar = false; if (UCBuscaDocenteTurma.ComboTurma.Valor[0] > 0 && UCBuscaDocenteTurma.ComboTurma.Valor[1] > 0 && UCBuscaDocenteTurma.ComboTurma.Valor[2] > 0) { if (UCBuscaDocenteTurma._VS_doc_id <= 0) { UCComboTurmaDisciplina.CarregarTurmaDisciplina(UCBuscaDocenteTurma.ComboTurma.Valor[0], true, 0, true); } else { UCComboTurmaDisciplina.CarregarTurmaDisciplina(UCBuscaDocenteTurma.ComboTurma.Valor[0], UCBuscaDocenteTurma._VS_doc_id, 0, true); } UCComboTurmaDisciplina.SetarFoco(); UCComboTurmaDisciplina.PermiteEditar = UCBuscaDocenteTurma.ComboTurma.Combo.SelectedIndex > 0; } } catch (Exception ex) { ApplicationWEB._GravaErro(ex); lblMessage.Text = UtilBO.GetErroMessage(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.Erro"), UtilBO.TipoMensagem.Erro); } }
protected void Page_Load(object sender, EventArgs e) { try { ScriptManager sm = ScriptManager.GetCurrent(this); if (sm != null) { sm.Scripts.Add(new ScriptReference(ArquivoJS.JQueryValidation)); } if (!IsPostBack) { InicializarTela(); CarregarBusca(); } UCBuscaDocenteTurma.IndexChanged_Turma += UCBuscaDocenteTurma_IndexChanged_Turma; } catch (Exception error) { ApplicationWEB._GravaErro(error); lblMessage.Text = UtilBO.GetErroMessage(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.Erro"), UtilBO.TipoMensagem.Erro); } finally { string message = __SessionWEB.PostMessages; if (!string.IsNullOrEmpty(message)) { lblMessage.Text = message; } // Inserção do título do relatório pnlBusca.GroupingText = Modulo.mod_nome; } }
/// <summary> /// Will set the background grid of the map view /// NOTE: Since we can't add this code inside XAML, thanks to ESRI sdk, we need to force it here. /// </summary> public void SetBackgroundGrid() { if (myMapView.BackgroundGrid.GridLineWidth != 0) { Services.SettingsServices.SettingsService _settings = Services.SettingsServices.SettingsService.Instance; CustomResource customColors = new CustomResource(); customColors.InitializeComponent(); if (customColors.ContainsKey("MapViewBackgroundGridLightColor")) { var appT = _settings.AppTheme; if (_settings.AppTheme == ApplicationTheme.Light) { Windows.UI.Color lightDefault = (Windows.UI.Color)customColors["MapViewBackgroundGridLightColor"]; myMapView.BackgroundGrid.Color = System.Drawing.Color.FromArgb(lightDefault.A, lightDefault.R, lightDefault.G, lightDefault.B); //myMapView.BackgroundGrid.GridLineColor = (Windows.UI.Color)customColors["MapViewBackgroundGridDarkColor"]; //myMapView.BackgroundGrid.GridLineWidth = 5; } else { Windows.UI.Color darkDefault = (Windows.UI.Color)customColors["MapViewBackgroundGridDarkColor"]; myMapView.BackgroundGrid.Color = System.Drawing.Color.FromArgb(darkDefault.A, darkDefault.R, darkDefault.G, darkDefault.B); //myMapView.BackgroundGrid.GridLineColor = (Windows.UI.Color)customColors["MapViewBackgroundGridLightColor"]; //myMapView.BackgroundGrid.GridLineWidth = 5; } } myMapView.BackgroundGrid.GridLineWidth = 0; myMapView.UpdateLayout(); } }
public new static bool Delete(ACA_TipoEquipamentoDeficiente entity) { ACA_TipoEquipamentoDeficienteDAO dao = new ACA_TipoEquipamentoDeficienteDAO(); dao._Banco.Open(IsolationLevel.ReadCommitted); try { if (GestaoEscolarUtilBO.VerificarIntegridade("ted_id" , entity.ted_id.ToString() , "ACA_TipoEquipamentoDeficiente" , dao._Banco)) { throw new ValidationException( CustomResource.GetGlobalResourceObject("BLL", "TipoEquipamentoDeficiente.ErroAoExcluir") ); } return(dao.Delete(entity)); } catch (Exception ex) { dao._Banco.Close(ex); throw; } finally { dao._Banco.Close(); } }
public static bool DeletarPorEletivasAlunos ( ACA_CurriculoDisciplina entity , TalkDBTransaction banco , Guid ent_id ) { if (VerificaCurriculoDisciplina(entity.cur_id, entity.crr_id, entity.crp_id, entity.dis_id, banco)) { ACA_CurriculoPeriodo crp = new ACA_CurriculoPeriodo { cur_id = entity.cur_id, crr_id = entity.crr_id, crp_id = entity.crp_id }; ACA_CurriculoPeriodoBO.GetEntity(crp, banco); ACA_Disciplina dis = new ACA_Disciplina { dis_id = entity.dis_id }; ACA_DisciplinaBO.GetEntity(dis, banco); throw new ValidationException("Não é possível excluir o(a) " + GestaoEscolarUtilBO.nomePadraoPeriodo(ent_id).ToLower() + " " + crp.crp_descricao + " do(a) " + CustomResource.GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA") + " eletiva " + dis.dis_nome + ", pois possui outros registros ligados a ele(a)."); } ACA_CurriculoDisciplinaDAO dao = new ACA_CurriculoDisciplinaDAO { _Banco = banco }; return(dao.Update_Situacao_By_EletivasAlunos(entity.cur_id, entity.crr_id, entity.crp_id, entity.dis_id)); }
protected void grvJustificativaFalta_RowDataBound(object sender, GridViewRowEventArgs e) { try { if (e.Row.RowType == DataControlRowType.DataRow) { ImageButton btnExcluir = (ImageButton)e.Row.FindControl("btnExcluir"); if (btnExcluir != null) { btnExcluir.CommandArgument = e.Row.RowIndex.ToString(); btnExcluir.Visible = __SessionWEB.__UsuarioWEB.GrupoPermissao.grp_excluir; } ImageButton btnEditar = (ImageButton)e.Row.FindControl("btnEditar"); if (btnEditar != null) { btnEditar.CommandArgument = e.Row.RowIndex.ToString(); btnExcluir.Visible = __SessionWEB.__UsuarioWEB.GrupoPermissao.grp_alterar; } } } catch (Exception ex) { ApplicationWEB._GravaErro(ex); lblMessage.Text = UtilBO.GetErroMessage(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.Erro"), UtilBO.TipoMensagem.Erro); } }
CustomResource CreateCustomResource(int id, string caption) { CustomResource result = new CustomResource(); result.Id = id; result.Caption = caption; return(result); }
void PopulateResourceList(CustomResourceList resources) { int count = resourceIdList.Length; for(int i = 0; i < count; i++) { CustomResource resource = new CustomResource(); resource.Id = resourceIdList[i]; resource.Caption = resourceCaptionList[i]; resources.Add(resource); } }
public void DeleteMethodHandler(CustomResource customResource) { int resourceIndex = Resources.GetResourceIndex(customResource.Id); if (resourceIndex >= 0) { Resources.RemoveAt(resourceIndex); } }
public static List <CustomResource> GetResources() { List <CustomResource> resources = new List <CustomResource>(); resources.Add(CustomResource.CreateCustomResource(1, "Max Fowler", Color.Yellow.ToArgb())); resources.Add(CustomResource.CreateCustomResource(2, "Nancy Drewmore", Color.Green.ToArgb())); resources.Add(CustomResource.CreateCustomResource(3, "Pak Jang", Color.LightPink.ToArgb())); return(resources); }
public void UpdateMethodHandler(CustomResource customResource) { int resourceIndex = Resources.GetResourceIndex(customResource.Id); if (resourceIndex >= 0) { Resources.RemoveAt(resourceIndex); Resources.Insert(resourceIndex, customResource); } }
public void EmitEvent(string action, string reason, string message, CustomResource involvedObject) { var objRef = new V1ObjectReference(involvedObject.ApiVersion, kind: involvedObject.Kind, name: involvedObject.Metadata.Name, namespaceProperty: involvedObject.Metadata.NamespaceProperty); V1Event ev = new V1Event(objRef, new V1ObjectMeta() { GenerateName = involvedObject.Metadata.Name }, action: action, message: message, reason: reason, firstTimestamp: DateTime.Now); client.CreateNamespacedEvent(ev, involvedObject.Metadata.NamespaceProperty); }
public static bool Delete ( ACA_Disciplina entity , string tabelasAdicionaisNaoVerificarIntegridade , TalkDBTransaction banco ) { ACA_DisciplinaDAO dao = new ACA_DisciplinaDAO(); if (banco == null) { dao._Banco.Open(IsolationLevel.ReadCommitted); } else { dao._Banco = banco; } LimpaCache(entity); string tabelasNaoVerificarIntegridade = "ACA_Disciplina,ACA_CurriculoDisciplina,ACA_DisciplinaMacroCampoEletivaAluno"; if (!string.IsNullOrEmpty(tabelasAdicionaisNaoVerificarIntegridade)) { tabelasNaoVerificarIntegridade = tabelasNaoVerificarIntegridade + "," + tabelasAdicionaisNaoVerificarIntegridade; } try { //Verifica se a disciplina pode ser deletada if (GestaoEscolarUtilBO.VerificarIntegridade("dis_id", entity.dis_id.ToString(), tabelasNaoVerificarIntegridade, dao._Banco)) { throw new ValidationException("Não é possível excluir o(a) " + CustomResource.GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA") + " " + entity.dis_nome + ", pois possui outros registros ligados a ela."); } //Deleta logicamente a disciplina return(dao.Delete(entity)); } catch (Exception err) { if (banco == null) { dao._Banco.Close(err); } throw; } finally { if (banco == null) { dao._Banco.Close(); } } }
public new static bool Delete ( CLS_TurmaNota entity, Guid usu_id = new Guid(), byte origemLogNota = 0, byte tipoLogNota = 0 ) { CLS_TurmaNotaDAO dao = new CLS_TurmaNotaDAO(); dao._Banco.Open(IsolationLevel.ReadCommitted); try { //Verifica se for a última atividade e algum aluno da turma possuir nota/parecer final então não permite excluir. if (!SelecionaPorTurmaDisciplinaPeriodoCalendario(entity.tud_id, entity.tpc_id, 0, Guid.Empty, dao._Banco).AsEnumerable() .Any(p => Convert.ToInt32(p["tnt_id"]) != entity.tnt_id) && CLS_AlunoAvaliacaoTurmaDisciplinaMediaBO.BuscaNotasFinaisTud(entity.tud_id, entity.tpc_id, dao._Banco).Any()) { throw new ValidationException(CustomResource.GetGlobalResourceObject("BLL", "CLS_TurmaNota.ValidacaoExclusaoUltimaAvaliacao").ToString()); } //Deleta logicamente a atividade dao.Delete(entity); if (origemLogNota > 0 && tipoLogNota > 0) { DateTime dataLogNota = DateTime.Now; LOG_TurmaNota_Alteracao entLogNota = new LOG_TurmaNota_Alteracao { tud_id = entity.tud_id, tnt_id = entity.tnt_id, usu_id = usu_id, ltn_origem = origemLogNota, ltn_tipo = tipoLogNota, ltn_data = dataLogNota }; LOG_TurmaNota_AlteracaoBO.Save(entLogNota, dao._Banco); } return(true); } catch (Exception err) { dao._Banco.Close(err); throw; } finally { dao._Banco.Close(); } }
protected void grvAluno_PageIndexChanging(object sender, GridViewPageEventArgs e) { try { Pesquisar(e.NewPageIndex); } catch (Exception ex) { ApplicationWEB._GravaErro(ex); lblMessage.Text = UtilBO.GetErroMessage(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.Erro"), UtilBO.TipoMensagem.Erro); } }
private CustomResource CreateGrpcTargetGroup(Vpc vpc, Dictionary <string, object> properties) { // https://github.com/intercept6/example-aws-cdk-custom-resource // CustomResource Lambda for TargetGroup support ProtocolVersion Grpc var targetGroupEventHandler = new SingletonFunction(this, "grpc-targetgroup", new SingletonFunctionProps { Uuid = "4ddd3cf8-0a1b-43ee-994e-c15a2ffe1bd2", Code = Code.FromAsset(Path.Combine(Directory.GetCurrentDirectory(), "lambda"), new Amazon.CDK.AWS.S3.Assets.AssetOptions { AssetHashType = AssetHashType.OUTPUT, Bundling = new BundlingOptions { Image = Runtime.NODEJS_12_X.BundlingDockerImage, User = "******", Command = new[] { "bash", "-c", string.Join(" && ", new [] { "cp -au src package.json yarn.lock /tmp", "cd /tmp", "npm install --global yarn", "yarn install", "yarn -s esbuild src/lambda/target-group.ts --bundle --platform=node --target=node12 --outfile=/asset-output/index.js", }), }, }, }), Runtime = Runtime.NODEJS_12_X, Handler = "index.handler", MemorySize = 512, Timeout = Duration.Minutes(10), InitialPolicy = new[] { new PolicyStatement(new PolicyStatementProps { Actions = new [] { "elasticloadbalancing:*" }, Resources = new [] { "*" }, }) }, }); var provider = new Provider(this, "customProvider", new ProviderProps { OnEventHandler = targetGroupEventHandler, }); var grpcTargetGroupResource = new CustomResource(this, "grpc-target-group-lambda", new CustomResourceProps { ServiceToken = provider.ServiceToken, Properties = properties, }); return(grpcTargetGroupResource); }
/// <summary> /// Verifica se o curso da turma possui avaliação do tipo seriado. /// </summary> /// <param name="entTurma">Entidade da turma.</param> /// <param name="EntFormatoAvaliacao">Entidade do formato de avaliação da turma.</param> /// <param name="banco">Transação.</param> /// <param name="entCurriculoPeriodo">Entidade do grupamento da turma (parâmatro de sáida)</param> /// <param name="Seriado">Flag que indica se o curso ~possui avaliação do tipo seriado (parâmatro de sáida)</param> /// <returns></returns> public static bool ValidaCursoSeriadoAvaliacao(TUR_Turma entTurma, ACA_FormatoAvaliacao EntFormatoAvaliacao, TalkDBTransaction banco, out ACA_CurriculoPeriodo entCurriculoPeriodo, out bool Seriado) { Seriado = false; List <TUR_TurmaCurriculo> listCurriculos = TUR_TurmaCurriculoBO.GetSelectBy_Turma(entTurma.tur_id, banco, GestaoEscolarUtilBO.MinutosCacheLongo); if (listCurriculos.Count == 0) { throw new Exception("A turma (tur_id: " + entTurma.tur_id + ") não possui nenhum curriculoPeriodo cadastrado."); } ACA_Curriculo entCurriculo = new ACA_Curriculo { cur_id = listCurriculos[0].cur_id , crr_id = listCurriculos[0].crr_id }; ACA_CurriculoBO.GetEntity(entCurriculo, banco); // Se curso for seriado por avaliações - EJA. if (entCurriculo.crr_regimeMatricula == (byte)ACA_CurriculoRegimeMatricula.SeriadoPorAvaliacoes) { Seriado = true; if ((EntFormatoAvaliacao.fav_tipo != (byte)ACA_FormatoAvaliacaoTipo.ConceitoGlobal) && (EntFormatoAvaliacao.fav_tipo != (byte)ACA_FormatoAvaliacaoTipo.GlobalDisciplina)) { // Curso do EJA não pode efetivar notas por disciplina - não possui ligação // com lançamento por disciplina. throw new ValidationException("O formato de avaliação \"" + EntFormatoAvaliacao.fav_nome + "\" deve ser do tipo \"Conceito global\" ou " + "\"Conceito global e nota por " + CustomResource.GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA") + "\", " + "pois o curso da turma é seriado por avaliações."); } } entCurriculoPeriodo = new ACA_CurriculoPeriodo { cur_id = entCurriculo.cur_id , crr_id = entCurriculo.crr_id , crp_id = listCurriculos[0].crp_id }; ACA_CurriculoPeriodoBO.GetEntity(entCurriculoPeriodo, banco); return(true); }
protected void ddlQtPaginado_SelectedIndexChanged(object sender, EventArgs e) { try { if (!grvAluno.Rows.Count.Equals(0)) { Pesquisar(0); } } catch (Exception ex) { ApplicationWEB._GravaErro(ex); lblMessage.Text = UtilBO.GetErroMessage(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.Erro"), UtilBO.TipoMensagem.Erro); } }
protected void Page_Load(object sender, EventArgs e) { try { ScriptManager sm = ScriptManager.GetCurrent(this); if (sm != null) { sm.Scripts.Add(new ScriptReference(ArquivoJS.JQueryValidation)); sm.Scripts.Add(new ScriptReference(ArquivoJS.JqueryMask)); sm.Scripts.Add(new ScriptReference(ArquivoJS.MascarasCampos)); sm.Scripts.Add(new ScriptReference(ArquivoJS.CamposData)); sm.Scripts.Add(new ScriptReference(ArquivoJS.MsgConfirmExclusao)); sm.Scripts.Add(new ScriptReference("~/Includes/jsAlunoJustificativaAbonoFalta.js")); } if (!IsPostBack) { if ((PreviousPage != null) && (PreviousPage.IsCrossPagePostBack)) { VS_alu_id = PreviousPage.EditItem_AluId; VS_mtu_id = PreviousPage.EditItem_MtuId; VS_tud_id = PreviousPage.EditItem_TudId; btnAddJustificativaFalta.Visible = __SessionWEB.__UsuarioWEB.GrupoPermissao.grp_inserir; grvJustificativaFalta.Columns[columnAlterar].Visible = __SessionWEB.__UsuarioWEB.GrupoPermissao.grp_alterar; grvJustificativaFalta.Columns[columnExcluir].Visible = __SessionWEB.__UsuarioWEB.GrupoPermissao.grp_excluir; LoadInformacoesAluno(); LoadGridJustificativaFalta(); } else { RedirecionarPagina("Busca.aspx"); } btnAddJustificativaFalta.Visible = __SessionWEB.__UsuarioWEB.GrupoPermissao.grp_inserir; } } catch (Exception ex) { fdsConsulta.Visible = false; fdsJustificativaFalta.Visible = false; ApplicationWEB._GravaErro(ex); lblMessage.Text = UtilBO.GetErroMessage(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.Erro"), UtilBO.TipoMensagem.Erro); } }
/// <summary> /// Inclui ou altera o tipo de equipamento de deficienete. /// </summary> /// <param name="entity">Entidade ACA_TipoEquipamentoDeficiente</param> public new static bool Save(ACA_TipoEquipamentoDeficiente entity) { if (entity.Validate()) { if (VerificaNomeExistente(entity)) { throw new DuplicateNameException( CustomResource.GetGlobalResourceObject("BLL", "TipoEquipamentoDeficiente.ValidaDuplicidade") ); } ACA_TipoEquipamentoDeficienteDAO dao = new ACA_TipoEquipamentoDeficienteDAO(); return(dao.Salvar(entity)); } throw new ValidationException(UtilBO.ErrosValidacao(entity)); }
/// <summary> /// Valida as disciplinas do curriculo de acordo com os dados do currículo do período /// </summary> /// <param name="cur_id">ID do curso</param> /// <param name="crr_id">ID do currículo</param> /// <param name="crp_id">ID do período do currículo</param> /// <param name="crp_controleTempo">Tipo de controle de tempo do período do currículo</param> /// <param name="crp_qtdeTemposSemana">Quantidade de tempos de aula na semana do período do currículo</param> /// <param name="crp_descricao">Descrição do período do currículo</param> /// <param name="banco">Conexão aberta com o banco de dados</param> /// <param name="ent_id">Id da entidade do usuário logado.</param> public static void ValidarCurriculoDisciplina ( int cur_id , int crr_id , int crp_id , byte crp_controleTempo , int crp_qtdeTemposSemana , string crp_descricao , TalkDBTransaction banco , Guid ent_id ) { // Verifica se existe mais de uma disciplina principal no mesmo periodo if (VerificaDisciplinaPrincipal(cur_id, crr_id, crp_id, banco)) { throw new ACA_CurriculoDisciplina_ValidationException("Só deve existir um(a) " + CustomResource.GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA") + " do tipo '" + CustomResource.GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA") + " principal' por " + GestaoEscolarUtilBO.nomePadraoPeriodo(ent_id).ToLower() + "."); } // Verifica se existe disciplina principal e disciplinas obrigatórias ao mesmo tempo if (VerificaDisciplinaPrincipalObrigatoria(cur_id, crr_id, crp_id, banco)) { throw new ACA_CurriculoDisciplina_ValidationException("Não podem existir um(a) " + CustomResource.GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA") + " do tipo '" + CustomResource.GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA") + " principal' e " + CustomResource.GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA_PLURAL") + " do tipo 'Obrigatório(a)' no(a) mesmo(a) " + GestaoEscolarUtilBO.nomePadraoPeriodo(ent_id).ToLower() + "."); } // Verifica se a carga horária semanal das disciplinas obrigatórias e eletivas // não é maior que a carga horária total semanal informada no período // quando o controle é feito por tempo de aulas if (crp_controleTempo == Convert.ToByte(ACA_CurriculoPeriodoControleTempo.TemposAula)) { if (VerificaCargaHorariaSemanal(cur_id, crr_id, crp_id, banco) > crp_qtdeTemposSemana) { throw new ACA_CurriculoDisciplina_ValidationException("A soma da carga horária semanal dos(as) " + CustomResource.GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA_PLURAL") + " não pode ser maior que a quantidade de tempos de aula de uma semana informado no(a) " + GestaoEscolarUtilBO.nomePadraoPeriodo(ent_id).ToLower() + " " + crp_descricao + "." + "<BR/> Obs: Para a soma da carga horária semanal dos(as) " + CustomResource.GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA_PLURAL") + " são consideradas todas os(as) " + CustomResource.GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA_PLURAL") + " do tipo 'Obrigatória' e um(a) " + CustomResource.GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA") + " de cada grupo de " + CustomResource.GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA_PLURAL") + " do tipo 'Eletiva' (com maior carga horária semanal) por " + GestaoEscolarUtilBO.nomePadraoPeriodo(ent_id).ToLower() + "."); } } }
protected void grvAluno_Sorting(object sender, GridViewSortEventArgs e) { GridView grid = (GridView)sender; if (!string.IsNullOrEmpty(e.SortExpression)) { Dictionary <string, string> filtros = __SessionWEB.BuscaRealizada.Filtros; SortDirection sortDirection = VS_SortDirection == SortDirection.Ascending ? SortDirection.Descending : SortDirection.Ascending; if (filtros.ContainsKey("VS_Ordenacao")) { filtros["VS_Ordenacao"] = e.SortExpression; } else { filtros.Add("VS_Ordenacao", e.SortExpression); } if (filtros.ContainsKey("VS_SortDirection")) { filtros["VS_SortDirection"] = sortDirection.ToString(); } else { filtros.Add("VS_SortDirection", sortDirection.ToString()); } __SessionWEB.BuscaRealizada = new BuscaGestao { PaginaBusca = PaginaGestao.JustificativaAbonoFalta , Filtros = filtros }; } try { Pesquisar(grid.PageIndex); } catch (Exception ex) { ApplicationWEB._GravaErro(ex); lblMessage.Text = UtilBO.GetErroMessage(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.Erro"), UtilBO.TipoMensagem.Erro); } }
protected void btnCancelar_Click(object sender, EventArgs e) { try { VS_ajf_id = -1; txtDataInicio.Text = ""; txtDataFim.Text = ""; txtObservacao.Text = ""; ScriptManager.RegisterStartupScript(Page, typeof(Page), "FecharJustificativaFalta", "$('#divCadastroJustificativaFalta').dialog('close');", true); } catch (Exception ex) { ApplicationWEB._GravaErro(ex); lblMessageCadastro.Text = UtilBO.GetErroMessage(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.Erro"), UtilBO.TipoMensagem.Erro); } }
/// <summary> /// Carrega o grid com as anotações dos alunos. /// </summary> private void LoadGridJustificativaFalta() { try { odsJustificativaFalta.SelectParameters.Clear(); odsJustificativaFalta.SelectParameters.Add("alu_id", VS_alu_id.ToString()); odsJustificativaFalta.SelectParameters.Add("tud_id", VS_tud_id.ToString()); grvJustificativaFalta.DataBind(); updJustificativaFalta.Update(); } catch (Exception ex) { ApplicationWEB._GravaErro(ex); lblMessage.Text = UtilBO.GetErroMessage(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.Erro"), UtilBO.TipoMensagem.Erro); } }
protected void btnAddJustificativaFalta_Click(object sender, EventArgs e) { try { VS_ajf_id = -1; txtDataInicio.Text = ""; txtDataFim.Text = ""; txtObservacao.Text = ""; ScriptManager.RegisterStartupScript(Page, typeof(Page), "AddJustificativaFalta", "$('#divCadastroJustificativaFalta').dialog('option', 'title', '" + CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.divCadastroJustificativaFalta.Title") + "');" + "$(document).ready(function() { $('#divCadastroJustificativaFalta').dialog('open'); });", true); } catch (Exception ex) { ApplicationWEB._GravaErro(ex); lblMessage.Text = UtilBO.GetErroMessage(CustomResource.GetGlobalResourceObject("Classe", "JustificativaAbonoFalta.Mensagem.Erro"), UtilBO.TipoMensagem.Erro); } }
/// <summary> /// Método que retorna a situação do aluno em forma de string. /// </summary> /// <param name="codigo">int pes_situacao</param> /// <returns>string com situação do aluno</returns> private static string situacao(int codigo) { string ret = ""; switch (codigo) { case (int)ACA_AlunoSituacao.Ativo: ret = CustomResource.GetGlobalResourceObject("Academico", "Aluno.AlunoSituacao.Ativo"); break; case (int)ACA_AlunoSituacao.Excluido: ret = CustomResource.GetGlobalResourceObject("Academico", "Aluno.AlunoSituacao.Excluido"); break; case (int)ACA_AlunoSituacao.Inativo: ret = CustomResource.GetGlobalResourceObject("Academico", "Aluno.AlunoSituacao.Inativo"); break; case (int)ACA_AlunoSituacao.Formado: ret = CustomResource.GetGlobalResourceObject("Academico", "Aluno.AlunoSituacao.Formado"); break; case (int)ACA_AlunoSituacao.EmMatricula: ret = CustomResource.GetGlobalResourceObject("Academico", "Aluno.AlunoSituacao.EmMatricula"); break; case (int)ACA_AlunoSituacao.Excedente: ret = CustomResource.GetGlobalResourceObject("Academico", "Aluno.AlunoSituacao.Excedente"); break; case (int)ACA_AlunoSituacao.EmPreMatricula: ret = CustomResource.GetGlobalResourceObject("Academico", "Aluno.AlunoSituacao.PreMatricula"); break; case (int)ACA_AlunoSituacao.Evadido: ret = CustomResource.GetGlobalResourceObject("Academico", "Aluno.AlunoSituacao.Evadido"); break; case (int)ACA_AlunoSituacao.EmMovimentacao: ret = CustomResource.GetGlobalResourceObject("Academico", "Aluno.AlunoSituacao.EmMovimentacao"); break; } return(ret); }
public static DataTable SelecionaTipoDisciplina_Curso(int cur_id, Guid ent_id) { bool controlarOrdem = ACA_ParametroAcademicoBO.ParametroValorBooleanoPorEntidade(eChaveAcademico.CONTROLAR_ORDEM_DISCIPLINAS, ent_id); ACA_TipoDisciplinaDAO dao = new ACA_TipoDisciplinaDAO(); DataTable dt = dao.SelectBy_Pesquisa_TipoDisciplina_Curso(controlarOrdem, cur_id); DataRow dr = dt.NewRow(); dr["tds_id"] = -1; dr["tds_nome"] = "-- Selecione um(a) " + CustomResource.GetGlobalResourceObject("Mensagens", "MSG_DISCIPLINA") + " --"; dt.Rows.InsertAt(dr, 0); //DataView dv = dt.DefaultView; //dv.Sort = "tds_nome"; return(dt); }
public HttpResponseMessage GetMinhasTurmasDocente() { try { var dados = TUR_TurmaBO.SelecionaPorDocenteControleTurma(__userLogged.Usuario.ent_id, __userLogged.Docente.doc_id, ApplicationWEB.AppMinutosCacheCurto); var dadosEscolasAtivas = dados.Where(p => p.Turmas.Any(t => t.tur_situacao == (byte)TUR_TurmaSituacao.Ativo)).ToList(); if (dadosEscolasAtivas.Count == 0) { // se o docente não possuir nenhuma turma - exibir a mensagem informativa var msg = CustomResource.GetGlobalResourceObject("Academico", "ControleTurma.Busca.DocenteSemTurma"); return Request.CreateResponse(HttpStatusCode.NoContent, msg); } var ret = dadosEscolasAtivas.Select(p => new MinhasTurmasDocente { calendarioId = p.cal_id, escolaId = p.esc_id, unidadeId = p.uni_id, escolaNome = p.esc_nome, Turmas = p.Turmas.Select( t => new Turma { codigo = t.tur_codigo, curso = t.tur_curso, nome = t.tud_nome, tipoDocente = t.TipoDocencia, turmaDisciplinaId = t.tud_id, turmaDocentePosicao = (byte)t.tdt_posicao, turmaId = t.tur_id, turno = t.tur_turno, AulasDadasVisivel = t.tud_tipo != (byte)ACA_CurriculoDisciplinaTipo.DocenciaCompartilhada && t.tud_tipo != (byte)ACA_CurriculoDisciplinaTipo.Experiencia, AulasDadasOk = t.tud_tipo != (byte)ACA_CurriculoDisciplinaTipo.DocenciaCompartilhada && t.tud_tipo != (byte)ACA_CurriculoDisciplinaTipo.Experiencia && t.aulasPrevistasPreenchida }) }); return Request.CreateResponse(HttpStatusCode.OK, ret); } catch (Exception ex) { return Request.CreateResponse(HttpStatusCode.InternalServerError, ex); } }
/// <summary> /// Create a new CustomResource object. /// </summary> /// <param name="key">Initial value of Key.</param> /// <param name="value">Initial value of Value.</param> /// <param name="lastActivityDate">Initial value of LastActivityDate.</param> public static CustomResource CreateCustomResource(string key, string value, global::System.DateTime lastActivityDate) { CustomResource customResource = new CustomResource(); customResource.Key = key; customResource.Value = value; customResource.LastActivityDate = lastActivityDate; return customResource; }
static CustomResource CreateCustomResource(int id, string caption) { CustomResource result = new CustomResource(); result.Id = id; result.Caption = caption; return result; }
/// <summary> /// There are no comments for CustomResourceSet in the schema. /// </summary> public void AddToCustomResourceSet(CustomResource customResource) { base.AddObject("CustomResourceSet", customResource); }
void OnInititialize(InitializeMessage msg) { int width = (int)(0.5 * msg.Device.Viewport.Width); int height = (int)(0.5 * msg.Device.Viewport.Height); m_ParticleTarget = new RenderTarget2D(msg.Device, width, height, false, SurfaceFormat.Color, DepthFormat.None); m_DataTarget = new RenderTarget2D(msg.Device, width, height, false, SurfaceFormat.Color, DepthFormat.None); var billboard = (CustomResource<VertexBufferResource<VertexPositionTexture>>) Owner.Engine.GetComponent<ResourceLoader>().GetResource("particle_billboard"); m_ParticleBuffer = billboard; m_InstanceBuffer = new DynamicVertexBuffer(msg.Device, typeof(VertexPositionTexture), 100, BufferUsage.WriteOnly); m_IndexBuffer = new IndexBuffer(msg.Device, IndexElementSize.SixteenBits, 6, BufferUsage.None); m_IndexBuffer.SetData(new short[] { 0, 1, 2, 3, 4, 5 }); }