public List<Ub3Sintetico> getListUb3Sintetico(bool isAtivo, string prdDe, string prdAte, string grupo)
        {
            List<Ub3Sintetico> lstUb3StcPrd = new List<Ub3Sintetico>();
            _Context = new Connection(this.ConnectionString);
            _Context.AbrirConexao();

            qryConsulta = SQLCommand.getQryUb3Sintetico(isAtivo, prdDe, prdAte, grupo);

            try
            {
                IDataReader reader = _Context.RetornaDados(qryConsulta);

                while (reader.Read())
                {
                    Ub3Sintetico ub3S = new Ub3Sintetico();
                    ub3S.DESCRIC = reader.GetString(reader.GetOrdinal("DESCRI"));
                    ub3S.UB3_ADVMES = reader.GetDouble(reader.GetOrdinal("UB3_ADVMES"));
                    ub3S.UB3_SUSMES = reader.GetDouble(reader.GetOrdinal("UB3_SUSMES"));
                    ub3S.UB3_ATMES = reader.GetDouble(reader.GetOrdinal("UB3_ATMES"));
                    ub3S.UB3_FALMES = reader.GetDouble(reader.GetOrdinal("UB3_FALMES"));
                    ub3S.UB3_REEMES = reader.GetDouble(reader.GetOrdinal("UB3_REEMES"));
                    ub3S.UB3_MULTAS = reader.GetDouble(reader.GetOrdinal("UB3_MULTAS"));
                    ub3S.UB3_ACID = reader.GetDouble(reader.GetOrdinal("UB3_ACID"));
                    ub3S.UB3_TOTAL = reader.GetDouble(reader.GetOrdinal("UB3_TOTAL"));

                    lstUb3StcPrd.Add(ub3S);
                }
            }
            catch (Exception) { throw; }

            _Context.FechaConexao();
            return lstUb3StcPrd;
        }
        /// <summary>
        /// retorna o ultimo fechamento do ponto no Protheus
        /// </summary>
        /// <returns></returns>
        public string getClosePonto()
        {
            string fechamentoPonto = string.Empty;
            string qry = SQLCommand.getQryFechamentoPonto();
            _Context = new Connection(this.ConnectionString);
            _Context.AbrirConexao();

            try
            {
                IDataReader reader = _Context.RetornaDados(qry);
                if (reader.Read())
                    fechamentoPonto = reader.GetString(0);
            }
            catch (Exception) { }

            _Context.FechaConexao();
            return fechamentoPonto;
        }
        /// <summary>
        /// Method responsável por cria lista referente ao ano/mes correspondente a consulta, por grupo, deforma analitica.
        /// </summary>
        /// <param name="grupo"></param>
        /// <param name="prdDe"></param>
        /// <returns></returns>
        public List<Ub3Analitico> getListUb3Analitico(bool isAtivo, string grupo, string prdDe, string prdAte)
        {
            List<Ub3Analitico> lstUb3AntPrd = new List<Ub3Analitico>();
            _Context = new Connection(this.ConnectionString);
            _Context.AbrirConexao();
            qryConsulta = string.Empty;
            qryConsulta = SQLCommand.getQryUb3Analitico(isAtivo, prdDe, prdAte, grupo);

            try
            {
                IDataReader reader = _Context.RetornaDados(qryConsulta);
                                
                while (reader.Read())
                {
                    Ub3Analitico ub3a = new Ub3Analitico();

                    ub3a.UNIDADE = reader.GetString(reader.GetOrdinal("UNIDADE"));
                    ub3a.CC = reader.GetString(reader.GetOrdinal("CC"));
                    ub3a.DESC_CC = reader.GetString(reader.GetOrdinal("DESC_CC"));
                    ub3a.UB3_MAT = reader.GetString(reader.GetOrdinal("UB3_MAT"));
                    ub3a.UB3_DEMIS = reader.GetString(reader.GetOrdinal("UB3_DEMIS"));
                    ub3a.UB3_ADVMES = reader.GetDouble(reader.GetOrdinal("UB3_ADVMES"));
                    ub3a.UB3_SUSMES = reader.GetDouble(reader.GetOrdinal("UB3_SUSMES"));
                    ub3a.UB3_ATMES = reader.GetDouble(reader.GetOrdinal("UB3_ATMES"));
                    ub3a.UB3_FALMES = reader.GetDouble(reader.GetOrdinal("UB3_FALMES"));
                    ub3a.UB3_REEMES = reader.GetDouble(reader.GetOrdinal("UB3_REEMES"));
                    ub3a.UB3_MULTAS = reader.GetDouble(reader.GetOrdinal("UB3_MULTAS"));
                    ub3a.UB3_ACID = reader.GetDouble(reader.GetOrdinal("UB3_ACID"));
                    ub3a.UB3_TOTAL = reader.GetDouble(reader.GetOrdinal("UB3_TOTAL"));

                    lstUb3AntPrd.Add(ub3a);
                }
            }
            catch (Exception) { }

            _Context.FechaConexao();
            return lstUb3AntPrd;
        }