public HttpResponseMessage RetornaPromocaoByIdFilial()
        {
            List <Promocao> lstReturn = new List <Promocao>();

            ConfigAppMembers cf = new ConfigAppMembers();

            try
            {
                cf        = Util.ConfigApp.getConfig();
                lstReturn = PromocaoADO.GetPromocao(cf.cdentifilial, cf.datasource, cf.schema);
            }
            catch (Exception e)
            {
                Util.LogUtil.GravaLog(this, "RetornaPromocaoByIdFilial: " + e.ToString(), cf.Cnpj, Log.TipoLog.erro);
                return(Request.CreateResponse(HttpStatusCode.BadRequest, "ERRO"));
            }
            return(Request.CreateResponse(HttpStatusCode.OK, lstReturn));
        }
        public HttpResponseMessage RetornaPromocaoByIdFilialCdpromocao(string cdpromocao)
        {
            Promocao promoReturn = new Promocao();

            ConfigAppMembers cf = new ConfigAppMembers();

            Util.LogUtil.GravaLog(this, "RetornaPromocaoByIdFilialCdpromocao: cdpromocao " + cdpromocao, cf.Cnpj, Log.TipoLog.info);
            try
            {
                cf          = Util.ConfigApp.getConfig();
                promoReturn = PromocaoADO.GetPromocaoByCdpromocao(cf.cdentifilial, cdpromocao, cf.datasource, cf.schema);
            }
            catch (Exception e)
            {
                Util.LogUtil.GravaLog(this, "RetornaPromocaoByIdFilialCdpromocao: " + e.ToString(), cf.Cnpj, Log.TipoLog.erro);
                return(Request.CreateResponse(HttpStatusCode.BadRequest, "ERRO"));
            }
            return(Request.CreateResponse(HttpStatusCode.OK, promoReturn));
        }