Exemple #1
0
        public string CarregarPagamentosAno(DaoKPIFinanceiroPagamentosAnoColecao daoKPIFinanceiroPagamentosAnoColecao)
        {
            try
            {
                string retorno = "ok";
                dalMySql.LimparParametros();
                dalMySql.ExecutarManipulacao(CommandType.StoredProcedure, "uspKPIFinanceiroPagamentosAnoDeletar");
                DataTable dataTableDaoKPIFinanceiroPagamentosAnoColecao = ConvertToDataTable(daoKPIFinanceiroPagamentosAnoColecao);
                foreach (DataRow linha in dataTableDaoKPIFinanceiroPagamentosAnoColecao.Rows)
                {
                    DaoKPIFinanceiroPagamentosAno daoKPIFinanceiroPagamentosAno = new DaoKPIFinanceiroPagamentosAno();
                    daoKPIFinanceiroPagamentosAno.Qtd   = Convert.ToInt32(linha["Qtd"]);
                    daoKPIFinanceiroPagamentosAno.Valor = Convert.ToDecimal(linha["Valor"]);
                    dalMySql.LimparParametros();
                    dalMySql.AdicionaParametros("@Qtd", daoKPIFinanceiroPagamentosAno.Qtd);
                    dalMySql.AdicionaParametros("@Valor", daoKPIFinanceiroPagamentosAno.Valor);

                    dalMySql.ExecutarManipulacao(CommandType.StoredProcedure, "uspKPIFinanceiroPagamentosAnoInserir");
                }
                return(retorno);
            }
            catch (Exception ex)
            {
                throw new Exception("Nao foi Possivel inserir dados no KPI Financeiro Pagamentos Mês. Detalhes: " + ex.Message);
            }
        }
Exemple #2
0
        public DaoKPIFinanceiroPagamentosAnoColecao RetornaPagamentosAno()
        {
            try
            {
                DaoKPIFinanceiroPagamentosAnoColecao daoKPIFinanceiroPagamentosAnoColecao = new DaoKPIFinanceiroPagamentosAnoColecao();
                dalSqlServer.LimparParametros();

                DataTable dataTableDaoKPIFinanceiroPagamentosAnoColecao = dalSqlServer.ExecutarConsulta(CommandType.StoredProcedure, "uspKPIFinanceiroPagamentosAno");

                foreach (DataRow linha in dataTableDaoKPIFinanceiroPagamentosAnoColecao.Rows)
                {
                    DaoKPIFinanceiroPagamentosAno daoKPIFinanceiroPagamentosAno = new DaoKPIFinanceiroPagamentosAno();
                    daoKPIFinanceiroPagamentosAno.Qtd   = Convert.ToInt32(linha["Qtd"]);
                    daoKPIFinanceiroPagamentosAno.Valor = Convert.ToDecimal(linha["Valor"]);

                    daoKPIFinanceiroPagamentosAnoColecao.Add(daoKPIFinanceiroPagamentosAno);
                }

                return(daoKPIFinanceiroPagamentosAnoColecao);
            }
            catch (Exception ex)
            {
                throw new Exception("Nao foi Possivel consultar os pagamentos do mês. Detalhes: " + ex.Message);
            }
        }