Example #1
0
        public DataTable TabelaPorEstadocomSiglaComPDV(int estadoID)
        {
            List <int> EventosID = new CarrinhoLista().CarregarEventosReservados(
                System.Web.HttpContext.Current.Session["ClienteID"].ToInt32(), System.Web.HttpContext.Current.Session.SessionID);

            IRLib.PontoVenda pDV = new IRLib.PontoVenda();
            return(pDV.TabelaPorEstadocomSiglaComPDV(estadoID, EventosID));
        }
Example #2
0
        public List <PontoVenda> Lista(string estado, string cidade, string EventosID)
        {
            PontoVendaHorarioLista   oHorarioLista;
            PontoVendaFormaPgtoLista oFormaPgtoLista;

            IRLib.PontoVenda  pDV     = new IRLib.PontoVenda();
            List <PontoVenda> retorno = new List <PontoVenda>();

            string strFormaPgto = "";

            foreach (DataRow item in pDV.CarregarTabelaPDV(EventosID, estado, cidade).Rows)
            {
                oHorarioLista   = new PontoVendaHorarioLista();
                oFormaPgtoLista = new PontoVendaFormaPgtoLista();
                oDiasExtenso    = new List <string>();

                oHorarioLista.CarregarHorarioPorPDV(item["ID"].ToInt32());
                CarregarHorario(oHorarioLista);
                oFormaPgtoLista.CarregarPDVFormaPgto(item["ID"].ToInt32());

                for (int i = 0; i < oFormaPgtoLista.Count; i++)
                {
                    if (i == 0)
                    {
                        strFormaPgto = oFormaPgtoLista[i].Nome;
                    }
                    else if (i == oFormaPgtoLista.Count - 1)
                    {
                        strFormaPgto += " e " + oFormaPgtoLista[i].Nome + ".";
                    }
                    else
                    {
                        strFormaPgto += ", " + oFormaPgtoLista[i].Nome;
                    }
                }

                retorno.Add(new PontoVenda
                {
                    id         = item["ID"].ToInt32(),
                    local      = item["Local"].ToString(),
                    nome       = item["Nome"].ToString(),
                    endereco   = item["Endereco"].ToString(),
                    numero     = item["Numero"].ToString(),
                    compl      = item["Compl"].ToString(),
                    cidade     = item["Cidade"].ToString(),
                    estado     = item["Estado"].ToString(),
                    bairro     = item["Bairro"].ToString(),
                    horario    = MontarStringInfoPDV(strFormaPgto),
                    uf         = estado,
                    referencia = item["Referencia"].ToString(),
                    cep        = item["CEP"].ToString(),
                });
            }

            return(retorno);
        }
Example #3
0
        public void Carregar(int pdvID)
        {
            IRLib.PontoVenda pDV = new IRLib.PontoVenda();
            pDV.CarregarPDV("ID = " + pdvID);

            this.Nome     = pDV.Nome.Valor;
            this.Endereco = pDV.Endereco.Valor;
            this.Numero   = pDV.Numero.Valor;
            this.Compl    = pDV.Compl.Valor;
        }
Example #4
0
        public List <PontoVenda> Lista(string estado, string cidade)
        {
            PontoVendaHorarioLista oHorarioLista;

            IRLib.PontoVenda  pDV     = new IRLib.PontoVenda();
            List <PontoVenda> retorno = new List <PontoVenda>();

            List <int> EventosID = new CarrinhoLista().CarregarEventosReservados(
                System.Web.HttpContext.Current.Session["ClienteID"].ToInt32(), System.Web.HttpContext.Current.Session.SessionID);


            foreach (DataRow item in pDV.CarregarTabelaPDV(EventosID, estado, cidade).Rows)
            {
                oHorarioLista = new PontoVendaHorarioLista();
                oDiasExtenso  = new List <string>();

                oHorarioLista.CarregarHorarioPorPDV(item["ID"].ToInt32());
                CarregarHorario(oHorarioLista);

                retorno.Add(new PontoVenda
                {
                    id         = item["ID"].ToInt32(),
                    local      = item["Local"].ToString(),
                    nome       = item["Nome"].ToString(),
                    endereco   = item["Endereco"].ToString(),
                    numero     = item["Numero"].ToString(),
                    compl      = item["Compl"].ToString(),
                    cidade     = item["Cidade"].ToString(),
                    estado     = item["Estado"].ToString(),
                    bairro     = item["Bairro"].ToString(),
                    horario    = MontarStringInfoPDV(),
                    uf         = estado,
                    referencia = item["Referencia"].ToString(),
                    cep        = item["CEP"].ToString(),
                });
            }

            return(retorno);
        }
Example #5
0
 public DataTable EstadosComPDV(string EventosID)
 {
     IRLib.PontoVenda pDV = new IRLib.PontoVenda();
     return(pDV.EstadosComPDV(EventosID));
 }
Example #6
0
 public DataTable EstadosComPDV(bool geral)
 {
     IRLib.PontoVenda pDV = new IRLib.PontoVenda();
     return(pDV.EstadosComPDV(geral));
 }
Example #7
0
 public DataTable TabelaPorEstadocomSiglaComPDV(int EstadoID, string EventosID)
 {
     IRLib.PontoVenda pDV = new IRLib.PontoVenda();
     return(pDV.TabelaPorEstadocomSiglaComPDV(EstadoID, EventosID));
 }
Example #8
0
 public DataTable TabelaPorEstadocomSiglaComPDV(int EstadoID, bool geral)
 {
     IRLib.PontoVenda pDV = new IRLib.PontoVenda();
     return(pDV.TabelaPorEstadocomSiglaComPDV(EstadoID, geral));
 }
Example #9
0
        public string buscarNome(int pdvID)
        {
            IRLib.PontoVenda pDV = new IRLib.PontoVenda();

            return(pDV.buscarNome(pdvID));
        }