Пример #1
0
        protected void Iniciar()
        {
            ApagarComponentes();
            int IdUsuario = Convert.ToInt16(Session["IdUsuario"]);

            //int IdUsuario = 3;
            ObjEU = ObjNE.BuscarUsuarioPorId(IdUsuario);
            List <E_UsuarioNegocios> LstUN = new N_UsuarioNegocios().LstUsuarioNegocio();
            List <E_Negocios>        LstN  = new List <E_Negocios>();
            E_Negocios Neg  = new E_Negocios();
            N_Negocio  NNeg = new N_Negocio();

            foreach (E_UsuarioNegocios UN in LstUN)
            {
                if (UN.IdUsuario == IdUsuario)
                {
                    Neg = NNeg.BuscarNegocioPorId(UN.IdNegocios);
                    if (Neg != null)
                    {
                        if (Neg.EstadoNegocio == "3")
                        {
                            LstN.Add(new N_Negocio().BuscarNegocioPorId(UN.IdNegocios));
                        }
                    }
                }
            }

            GridView1.DataSource = LstN;
            GridView1.DataBind();
        }
Пример #2
0
        protected void btnBuscar_Click(object sender, EventArgs e)
        {
            List <E_Negocios> lstN    = new N_Negocio().LstNegocios();
            List <E_Negocios> lista2  = new List <E_Negocios>();
            string            pattern = tbBuscarNegocio.Text;

            foreach (E_Negocios en in lstN)
            {
                if (Regex.IsMatch(en.NombreNegocio.ToUpper(), pattern.ToUpper()))
                {
                    lista2.Add(en);
                }
            }
            if (lista2.Count != 0)
            {
                gridnegocios.DataSource = lista2;
                gridnegocios.DataBind();
                regresar.Visible = true;
            }
            else
            {
                tbBuscarNegocio.Attributes.Add("class", "form-control mr-sm-2 is-invalid");
                lblNegocioNoEncontrado.Text = "Negocio no registrado en el sistema";
            }
        }
Пример #3
0
        protected void Iniciar()
        {
            regresar.Visible = false;
            List <E_Negocios> lstN = new N_Negocio().LstNegocios();

            foreach (E_Negocios E in lstN)
            {
                E.CalleNegocio = "Calle " + E.CalleNegocio + " #" + E.NumeroCalle + " Colonia " + E.ColoniaNegocio + " CP: " + E.CodigoPostal;
            }
            gridnegocios.DataSource = lstN;
            gridnegocios.DataBind();
        }
        protected void Iniciar()
        {
            ApagarComponentes();
            string            Negocio = Convert.ToString(Session["Negocio"]);
            List <E_Negocios> LstN    = new N_Negocio().LstNegocios();
            List <E_Negocios> LstNT   = new List <E_Negocios>();

            foreach (E_Negocios N in LstN)
            {
                if (N.NombreNegocio == Negocio && N.EstadoNegocio == "3")
                {
                    LstNT.Add(new N_Negocio().BuscarUsuarioPorNombre(N.NombreNegocio));
                }
            }

            grvNegocios.DataSource = LstNT;
            grvNegocios.DataBind();
        }
Пример #5
0
        protected void Iniciar()
        {
            int        idnegocio = Convert.ToInt16(Session["IdNegocio"]);
            E_Negocios neg       = new N_Negocio().BuscarNegocioPorId(idnegocio);
            E_Producto prod      = new E_Producto();

            lbnegocio.Text      = neg.NombreNegocio;
            lbnombreneg.Text    = neg.NombreNegocio;
            lbubicacionneg.Text = neg.CalleNegocio + " # " + neg.NumeroCalle + " " + neg.ColoniaNegocio + " " + neg.CodigoPostal;
            lbtiponeg.Text      = neg.TipoNegocio;
            lbnumneg.Text       = neg.TelefonoNegocio;
            E_HorarioNegocios ObjEHN = new N_HorarioNegocios().BuscarHorarioNegociosPorIdNegocio(neg.IdNegocios);

            if (ObjEHN != null)
            {
                lblL.Text  = ObjEHN.LE + "--" + ObjEHN.LS;
                lblM.Text  = ObjEHN.ME + "--" + ObjEHN.MS;
                lblMi.Text = ObjEHN.MIE + "--" + ObjEHN.MIS;
                lblJ.Text  = ObjEHN.JE + "--" + ObjEHN.JS;
                lblV.Text  = ObjEHN.VE + "--" + ObjEHN.VS;
                lblS.Text  = ObjEHN.SE + "--" + ObjEHN.SS;
                lblD.Text  = ObjEHN.DE + "--" + ObjEHN.DS;
            }
            List <E_ProductoNegocios> lstprodneg = new N_ProductoNegocios().LstNegocios();
            List <E_ProductoNegocios> lstprecio  = new List <E_ProductoNegocios>();
            List <E_Producto>         LEP        = new List <E_Producto>();

            foreach (E_ProductoNegocios E in lstprodneg)
            {
                if (E.IdNegocios == idnegocio)
                {
                    lstprecio.Add(E);
                    prod = new N_Producto().BuscarProductoPorId(E.IdProducto);
                    prod.MedidaProducto = "$ " + E.Precios;
                    LEP.Add(prod);
                }
            }
            gridNombreP.DataSource = LEP;
            gridNombreP.DataBind();
        }