Example #1
0
        private void cboCargo_SelectionChangeCommitted(object sender, EventArgs e)
        {
            try
            {
                apoio.Aguarde("Carregando pessoas...");
                CodCargo = Convert.ToString(cboCargo.SelectedValue);

                carregarPessoa();
            }
            catch (SqlException exl)
            {
                excp = new clsException(exl);
            }
            catch (Exception ex)
            {
                excp = new clsException(ex);
            }
            finally
            {
                apoio.FecharAguarde();
            }
        }
Example #2
0
 private void gridVincular_CellEndEdit(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         //desabilitação das celulas após a saída da mesma
         if (gridVincular != null && gridVincular.Rows.Count > 0)
         {
             if (gridVincular.ReadOnly.Equals(false))
             {
                 gridVincular.Columns[e.ColumnIndex].ReadOnly = true;
             }
         }
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
 }
Example #3
0
        private void frmMixListaReuniao_Load(object sender, EventArgs e)
        {
            try
            {
                //chama a funcão montar grid
                new BLL_GridCargo().MontarGrid(gridCargo, string.Empty);

                //funcoes.gridRegiao(gridRegiao, "VisaoOrquestral");
                //funcoes.gridCCB(gridComComum, "VisaoOrquestral");

                //verificar permissão de acesso
                //verPermVisao();
            }
            catch (SqlException exl)
            {
                excp = new clsException(exl);
            }
            catch (Exception ex)
            {
                excp = new clsException(ex);
            }
        }
Example #4
0
 private void btnDataVisual_Click(object sender, EventArgs e)
 {
     try
     {
         apoio.Aguarde();
         Codigo = gridData[0, gridData.CurrentRow.Index].Value.ToString();
         abrirForm("frmSucesso", gridData);
         ((frmImportarPessoaSucesso)formulario).Text = "Visualizando Importação";
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
     finally
     {
         apoio.FecharAguarde();
     }
 }
Example #5
0
 private void cboTonalidade_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cboTonalidade.SelectedValue != null)
     {
         try
         {
             lblTonalidade.Text = Convert.ToString(cboTonalidade.SelectedValue);
         }
         catch (SqlException exl)
         {
             excp = new clsException(exl);
         }
         catch (Exception ex)
         {
             excp = new clsException(ex);
         }
         finally
         {
             apoio.FecharAguarde();
         }
     }
 }
 private void gridSubModulo_RowStateChanged(object sender, DataGridViewRowStateChangedEventArgs e)
 {
     try
     {
         if (this.gridSubMod.RowCount > 0)
         {
             this.btnDescSel.Enabled = true;
         }
         else
         {
             this.btnDescSel.Enabled = false;
         }
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
 }
Example #7
0
 private void btnSelReg_Click(object sender, EventArgs e)
 {
     try
     {
         apoio.Aguarde();
         Codigo = gridRegiao["CodSolicitaTeste", gridRegiao.CurrentRow.Index].Value.ToString();
         //chama a rotina para preencher dados
         preencher(Codigo);
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
     finally
     {
         apoio.FecharAguarde();
     }
 }
Example #8
0
 private void gridVincular_CellLeave(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         //desabilitação das celulas após a saida
         if (gridVincular != null || gridVincular.Rows.Count > 0)
         {
             if (gridVincular.ReadOnly.Equals(false))
             {
                 gridVincular.EndEdit();
             }
         }
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
 }
Example #9
0
 private void gridDesc_RowStateChanged(object sender, DataGridViewRowStateChangedEventArgs e)
 {
     try
     {
         if (gridDesc.RowCount > 0)
         {
             btnSel.Enabled = true;
         }
         else
         {
             btnSel.Enabled = false;
         }
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
 }
Example #10
0
 private void optCandidato_CheckedChanged(object sender, EventArgs e)
 {
     try
     {
         if (optCandidato.Checked.Equals(true))
         {
             lblTipoEscolha.Text = "Candidato";
         }
         else
         {
             lblTipoEscolha.Text = string.Empty;
         }
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
 }
Example #11
0
 private void optLicao_CheckedChanged(object sender, EventArgs e)
 {
     try
     {
         if (optLicao.Checked.Equals(true))
         {
             lblPaginaFase.Text = "Lição";
         }
         else
         {
             lblPaginaFase.Text = string.Empty;
         }
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
 }
Example #12
0
 private void optTroca_CheckedChanged(object sender, EventArgs e)
 {
     try
     {
         if (optTroca.Checked.Equals(true))
         {
             lblTipo.Text = "Troca Instrumento";
         }
         else
         {
             lblTipo.Text = string.Empty;
         }
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
 }
Example #13
0
 private void optRjm_CheckedChanged(object sender, EventArgs e)
 {
     try
     {
         if (optRjm.Checked.Equals(true))
         {
             lblTipo.Text = "Reunião de Jovens";
         }
         else
         {
             lblTipo.Text = string.Empty;
         }
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
 }
Example #14
0
 private void gridPessoa_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (gridPessoa != null || gridPessoa.RowCount > 0)
         {
             //ao clicar na linha marca ou desmarca a primeira coluna
             //verifica a situação da celula
             if (gridPessoa != null || gridPessoa.RowCount > 0)
             {
                 if (gridPessoa["Marcado", e.RowIndex].Value != null)
                 {
                     if (gridPessoa["Marcado", e.RowIndex].Value.Equals(true))
                     {
                         gridPessoa["Marcado", e.RowIndex].Value = false;
                     }
                     else
                     {
                         gridPessoa["Marcado", e.RowIndex].Value = true;
                     }
                 }
                 else
                 {
                     gridPessoa["Marcado", e.RowIndex].Value = true;
                 }
                 gridPessoa.Refresh();
                 txtSelecionados.Text = Convert.ToString(pessoaSelecionada()).PadLeft(5, '0');
             }
         }
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
 }
Example #15
0
        private void gridComum_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                //ao clicar na linha marca ou desmarca a primeira coluna
                //verifica a situação da celula
                if (gridComum != null || gridComum.RowCount > 0)
                {
                    if (gridComum["Marcado", e.RowIndex].Value != null)
                    {
                        if (gridComum["Marcado", e.RowIndex].Value.Equals(true))
                        {
                            gridComum["Marcado", e.RowIndex].Value = false;
                        }
                        else
                        {
                            gridComum["Marcado", e.RowIndex].Value = true;
                        }
                    }
                    else
                    {
                        gridComum["Marcado", e.RowIndex].Value = true;
                    }
                    gridComum.Refresh();
                }
                CodComum = preencherSelecionados("Comum", gridComum);

                carregarPessoa();
            }
            catch (SqlException exl)
            {
                excp = new clsException(exl);
            }
            catch (Exception ex)
            {
                excp = new clsException(ex);
            }
        }
Example #16
0
 private void gridCargo_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (gridCargo != null || gridCargo.RowCount > 0)
         {
             //ao clicar na linha marca ou desmarca a primeira coluna
             //verifica a situação da celula
             if (gridCargo != null || gridCargo.RowCount > 0)
             {
                 if (gridCargo["Marcado", e.RowIndex].Value != null)
                 {
                     if (gridCargo["Marcado", e.RowIndex].Value.Equals(true))
                     {
                         gridCargo["Marcado", e.RowIndex].Value = false;
                     }
                     else
                     {
                         gridCargo["Marcado", e.RowIndex].Value = true;
                     }
                 }
                 else
                 {
                     gridCargo["Marcado", e.RowIndex].Value = true;
                 }
                 gridCargo.Refresh();
             }
         }
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
 }
Example #17
0
 private void txtModulo_Leave(object sender, EventArgs e)
 {
     if (!this.txtModulo.Text.Equals(string.Empty))
     {
         try
         {
             apoio.Aguarde();
             this.carregaMod(this.txtModulo.Text);
         }
         catch (SqlException exl)
         {
             excp = new clsException(exl);
         }
         catch (Exception ex)
         {
             excp = new clsException(ex);
         }
         finally
         {
             apoio.FecharAguarde();
         }
     }
 }
Example #18
0
 private void btnDescVisual_Click(object sender, EventArgs e)
 {
     try
     {
         apoio.Aguarde();
         Codigo = gridDesc["CodNovidades", gridDesc.CurrentRow.Index].Value.ToString();
         abrirForm(string.Empty, gridDesc);
         ((frmNovidade)formulario).Text = "Visualizando Novidades";
         ((frmNovidade)formulario).disabledForm();
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
     finally
     {
         apoio.FecharAguarde();
     }
 }
Example #19
0
 private void txtRegional_Leave(object sender, EventArgs e)
 {
     if (!txtRegional.Text.Trim().Equals(string.Empty))
     {
         try
         {
             apoio.Aguarde();
             carregaRegional(txtRegional.Text);
         }
         catch (SqlException exl)
         {
             excp = new clsException(exl);
         }
         catch (Exception ex)
         {
             excp = new clsException(ex);
         }
         finally
         {
             apoio.FecharAguarde();
         }
     }
 }
Example #20
0
 private void btnAcaoEditar_Click(object sender, EventArgs e)
 {
     try
     {
         apoio.Aguarde();
         this.abrirForm("frmRot", this.gridRot);
         ((frmRotina)formRotina).Text = "Editando Rotinas";
         ((frmRotina)formRotina).enabledForm();
         ((frmRotina)formRotina).defineFoco();
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
     finally
     {
         apoio.FecharAguarde();
     }
 }
Example #21
0
        public frmLogin()
        {
            InitializeComponent();

            bool retorno;

            BLL.conecta.conectarBanco formulario;
            formulario = new BLL.conecta.conectarBanco();

            try
            {
                retorno = formulario.conectar();
            }
            catch (Exception ex)
            {
                excp = new clsException(ex);
            }
            finally
            {
                formulario.Close();
                formulario.Dispose();
            }
        }
Example #22
0
 private void chkOficial_CheckedChanged(object sender, EventArgs e)
 {
     try
     {
         if (chkOficial.Checked.Equals(true))
         {
             lblOficial.Text = "Oficializado";
         }
         else
         {
             lblOficial.Text = string.Empty;
         }
         formarDesenvolvimento();
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
 }
Example #23
0
 private void btnSubEditar_Click(object sender, EventArgs e)
 {
     try
     {
         apoio.Aguarde();
         this.abrirForm("frmSubMod", this.gridSubMod);
         ((frmSubModulo)formSubModulo).Text = "Editando Sub-Módulos";
         ((frmSubModulo)formSubModulo).enabledForm();
         ((frmSubModulo)formSubModulo).defineFoco();
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
     finally
     {
         apoio.FecharAguarde();
     }
 }
Example #24
0
 private void chkRJM_CheckedChanged(object sender, EventArgs e)
 {
     try
     {
         if (chkRJM.Checked.Equals(true))
         {
             lblRjm.Text = "Reunião Jovens";
         }
         else
         {
             lblRjm.Text = string.Empty;
         }
         formarDesenvolvimento();
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
 }
Example #25
0
 private void chkDivorciado_CheckedChanged(object sender, EventArgs e)
 {
     try
     {
         if (chkDivorciado.Checked.Equals(true))
         {
             lblDivorciado.Text = "Divorciado(a)";
         }
         else
         {
             lblDivorciado.Text = string.Empty;
         }
         formarEstadoCivil();
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
 }
Example #26
0
 private void lblCodRegiao_TextChanged(object sender, EventArgs e)
 {
     if (!lblCodRegiao.Text.Equals(string.Empty))
     {
         try
         {
             apoio.Aguarde();
             carregaGrid("Regiao", lblCodRegiao.Text, gridRegiao);
         }
         catch (SqlException exl)
         {
             excp = new clsException(exl);
         }
         catch (Exception ex)
         {
             excp = new clsException(ex);
         }
         finally
         {
             apoio.FecharAguarde();
         }
     }
 }
Example #27
0
 private void btnSel_Click(object sender, EventArgs e)
 {
     try
     {
         apoio.Aguarde();
         Codigo       = gridDesc[0, gridDesc.CurrentRow.Index].Value.ToString();
         DialogResult = DialogResult.OK;
         //fecha o formulário
         Close();
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
     finally
     {
         apoio.FecharAguarde();
     }
 }
Example #28
0
 private void btnDescIns_Click(object sender, EventArgs e)
 {
     try
     {
         apoio.Aguarde();
         //chama a rotina para abrir o formulario
         AbrirForm(string.Empty, gridDesc, 0);
         ((frmCargo)formulario).Text = "Inserindo Cargo";
         ((frmCargo)formulario).EnabledForm();
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
     finally
     {
         apoio.FecharAguarde();
     }
 }
Example #29
0
 private void btnRegVisual_Click(object sender, EventArgs e)
 {
     try
     {
         apoio.Aguarde();
         Codigo = gridRegiao[2, gridRegiao.CurrentRow.Index].Value.ToString();
         abrirForm(string.Empty, gridRegiao);
         ((frmCCB)formulario).Text = "Visualizando Comum";
         ((frmCCB)formulario).disabledForm();
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
     finally
     {
         apoio.FecharAguarde();
     }
 }
Example #30
0
 private void btnDescVisual_Click(object sender, EventArgs e)
 {
     try
     {
         apoio.Aguarde();
         codigo = Convert.ToInt32(gridDesc["CodCargo", gridDesc.CurrentRow.Index].Value);
         AbrirForm(string.Empty, gridDesc, codigo);
         ((frmCargo)formulario).Text = "Visualizando Cargo";
         ((frmCargo)formulario).DisabledForm();
     }
     catch (SqlException exl)
     {
         excp = new clsException(exl);
     }
     catch (Exception ex)
     {
         excp = new clsException(ex);
     }
     finally
     {
         apoio.FecharAguarde();
     }
 }