예제 #1
0
        private void BtnGerar_Click(object sender, EventArgs e)
        {
            string _tiporegistro = null;

            if (rdbMensal.Checked)
            {
                _tiporegistro = "300";
            }
            else if (rdbAdiantamento.Checked)
            {
                _tiporegistro = "550";
            }
            else if (rdbDecimoTerceiro.Checked)
            {
                _tiporegistro = "450";
            }

            SCI.Trabalhista.ResultadoListarVerbaCadastrada resultado = wrTrabalhista.FolhaCentroCusto(Guid, cptCompetencia.AnoMes, _tiporegistro, null, null);
            if (resultado.Sucesso)
            {
                rpvAnalitico.LocalReport.DataSources.Clear();
                if (resultado.RetornoListarVerbaCadastrada != null)
                {
                    ReportDataSource _source = new ReportDataSource("Registro", resultado.RetornoListarVerbaCadastrada.Cast <SCI.Trabalhista.Registro>().ToList()
                                                                    .ConvertAll <Model.Trabalhista.Registro>(_registro => new Model.Trabalhista.Registro(_registro)));
                    rpvAnalitico.LocalReport.DataSources.Add(_source);
                }
                rpvAnalitico.LocalReport.SetParameters(new ReportParameter[] { new ReportParameter("Agora", DateTime.Now.ToString()) });
                rpvAnalitico.RefreshReport();
            }
        }
예제 #2
0
        private void AtualizarVerbas()
        {
            Novo   = false;
            Custom = false;
            registros.Clear();
            dgvPagamento.Rows.Clear();
            dgvAdiantamento.Rows.Clear();
            dgv13Salario.Rows.Clear();
            dgvFeriasBloco1.Rows.Clear();
            dgvFeriasBloco2.Rows.Clear();
            dgvFeriasBloco3.Rows.Clear();

            if (!String.IsNullOrEmpty(cptCompetencia.AnoMes) && stbFuncionario.GetSelectedItem() != null)
            {
                if (LiberaNovo())
                {
                    Novo = true;
                }
                if (LiberaCalcular())
                {
                    Custom = true;
                }

                SCI.Trabalhista.ResultadoListarVerbaCadastrada resultado = wrTrabalhista.ListarVerbaCadastrada(Guid, cptCompetencia.AnoMes, ((Model.Trabalhista.Funcionario)stbFuncionario.GetSelectedItem())?.Codigo.ToString());
                if (resultado.Sucesso)
                {
                    if (resultado.RetornoListarVerbaCadastrada != null)
                    {
                        PopularVerbaCadastrada(resultado.RetornoListarVerbaCadastrada);
                    }
                }
                else
                {
                    MessageBox.Show(resultado.Mensagem);
                }
            }
        }