/// <summary> /// Função que resume as informações para enviar a classe de negocios para salvar /// </summary> private void gerarRelatorio() { try { if (ValidarControles().Equals(true)) { CodCargo = Convert.ToInt16(cboCargo.SelectedValue).ToString(); CodComum = modulos.CodUsuarioCCB; objBLL_Pessoa = new BLL_buscaRelatorioPessoa(); listaPessoa = objBLL_Pessoa.Buscar(lblSexo.Text, lblEstadoCivil.Text, CodCargo, CodComum, lblStatus.Text.Equals("Sim") ? true : false); List <MOD_pessoa> listaOrdem = new List <MOD_pessoa>(); listaOrdem = listaPessoa.OrderBy(p => p.Nome).ToList(); ///Listagem Agrupada pela Região if (optAgruRegiao.Checked.Equals(true)) { if (chkAgruComum.Checked.Equals(true)) { string NomeRelatorio = "ccbrepess.relatorios.rptListaPessoa_Nome_Reg_Comum.rdlc"; abrirForm(listaOrdem, NomeRelatorio); } else { string NomeRelatorio = "ccbrepess.relatorios.rptListaPessoa_Nome_Reg.rdlc"; abrirForm(listaOrdem, NomeRelatorio); } } ///Listagem Agrupada pela Cidade else if (optAgruCidade.Checked.Equals(true)) { if (chkAgruComum.Checked.Equals(true)) { string NomeRelatorio = "ccbrepess.relatorios.rptListaPessoa_Nome_Cid_Comum.rdlc"; abrirForm(listaOrdem, NomeRelatorio); } else { string NomeRelatorio = "ccbrepess.relatorios.rptListaPessoa_Nome_Cid.rdlc"; abrirForm(listaOrdem, NomeRelatorio); } } } } catch (ArgumentException ae) { throw new Exception(ae.Message); } catch (SqlException exl) { throw exl; } catch (Exception ex) { throw ex; } }
/// <summary> /// Função que carrega os dados da pessoa no Grid /// </summary> private void carregarPessoa() { try { if (!string.IsNullOrEmpty(CodComum) && !string.IsNullOrEmpty(CodCargo)) { if (ValidarControles().Equals(true)) { CodCargo = Convert.ToInt64(cboCargo.SelectedValue).ToString(); CodComum = preencherSelecionados("Comum", gridComum); objBLL_Pessoa = new BLL_buscaRelatorioPessoa(); if (lblStatus.Text.Equals("Ambos")) { listaPessoa = objBLL_Pessoa.Buscar(lblSexo.Text, lblEstadoCivil.Text, CodCargo, CodComum); } else { listaPessoa = objBLL_Pessoa.Buscar(lblSexo.Text, lblEstadoCivil.Text, CodCargo, CodComum, lblStatus.Text.Equals("Sim") ? true : false); } listaPessoa = listaPessoa.OrderBy(p => p.Descricao).ToList(); funcoes.gridPessoa(gridPessoa, "Relatorios"); gridPessoa.DataSource = listaPessoa; txtQtdeRegistro.Text = Convert.ToString(gridPessoa.RowCount).PadLeft(5, '0'); } else { funcoes.gridPessoa(gridPessoa, "Relatorios"); txtQtdeRegistro.Text = Convert.ToString(gridPessoa.RowCount).PadLeft(5, '0'); } } else { funcoes.gridPessoa(gridPessoa, "Relatorios"); txtQtdeRegistro.Text = Convert.ToString(gridPessoa.RowCount).PadLeft(5, '0'); } } catch (ArgumentException ae) { throw new Exception(ae.Message); } catch (SqlException exl) { throw exl; } catch (Exception ex) { throw ex; } }
public IEnumerable <MOD_pessoa> BuscaRelatorioPessoa(string sexo, string estadoCivil, string codCargo, string codCCB, bool ativo, string campoData, DateTime dataInicial, DateTime dataFinal, string desenvolvimento) { try { objBLL_BuscaRelatorio = new BLL_buscaRelatorioPessoa(); return(objBLL_BuscaRelatorio.Buscar(sexo, estadoCivil, codCargo, codCCB, ativo, campoData, funcoes.FormataData(Convert.ToString(dataInicial)), funcoes.FormataData(Convert.ToString(dataFinal)), desenvolvimento)); } catch (SqlException exl) { throw exl; } catch (Exception ex) { throw ex; } }
public IEnumerable <MOD_pessoa> BuscaRelatorioPessoa(string sexo, string estadoCivil, string codCargo, string codCCB, bool ativo, string desenvolvimento) { try { objBLL_BuscaRelatorio = new BLL_buscaRelatorioPessoa(); return(objBLL_BuscaRelatorio.Buscar(sexo, estadoCivil, codCargo, codCCB, ativo, desenvolvimento)); } catch (SqlException exl) { throw exl; } catch (Exception ex) { throw ex; } }