Example #1
0
        public IActionResult EfectuarCompra(int id)
        {
            Entity.Producto producto             = ProductoDAo.get(_context, id);
            Entity.Negocio  negocio              = NegocioDao.get(_context, producto.NegocioID);
            OrdenPedidoGeneralModelAndView model = new OrdenPedidoGeneralModelAndView(negocio);

            model.Producto = producto;
            return(View(model));
        }
 public void llenarEnBaseAUnNegocio(Entity.Negocio negocio, HiShopContext _context)
 {
     this.id          = negocio.ID;
     this.Nombre      = negocio.Nombre;
     this.CategoriaFK = negocio.CategoriaID;
     this.ProvinciaFK = LocalidadDao.get(_context, negocio.LocalidadID).ProvinciaID;
     this.LocalidadFK = negocio.LocalidadID;
     this.Calle       = negocio.Calle;
     this.Numero      = negocio.Numero;
     this.Telefono    = negocio.Telefono;
     this.Email       = negocio.Email;
     this.Descripcion = negocio.Descripcion;
     this.urlImagen   = negocio.UrlImagenNegocio;
     // this.ShowroomFk = negocio.ShowroomID;
     llenarListados(_context);
 }
Example #3
0
 /// <summary>
 /// Llenar los elementos del modelo
 /// </summary>
 /// <param name="_context"></param>
 public void llenarElmentos(HiShopContext _context, Entity.Negocio negocio)
 {
     this.showroom = ShowroomDao.get(_context, Convert.ToInt32(negocio.ShowroomID.ToString()));
     if (this.showroom.tieneBanner())
     {
         this.showroom.Banner = BannerDao.get(_context, Convert.ToInt32(this.showroom.BannerID.ToString()));
     }
     else
     {
         this.showroom.Banner = new Banner();
     }
     if (this.showroom.tieneCuerpo())
     {
         this.showroom.Cuerpo = CuerpoDao.get(_context, Convert.ToInt32(this.showroom.CuerpoID.ToString()));
     }
     else
     {
         this.showroom.Cuerpo = new Cuerpo();
     }
 }
 public ShowroomGeneralModelAndView(Entity.Negocio negocio)
 {
     this.Negocio = negocio;
 }
 public OrdenPedidoGeneralModelAndView(Entity.Negocio negocio) : base(negocio)
 {
 }