示例#1
0
        public ActionResult AddProducto(string Nombre, string imagen, string precio)
        {
            Producto obj = new Producto();

            obj.nNombre = Nombre;
            obj.nPrecio = precio;
            obj.dImagen = imagen;
            dao.AddProducto(obj);
            ProductoXTienda obj2 = new ProductoXTienda();

            obj2.Producto        = obj;
            obj2.Tienda_idTienda = (Int32)Session["idUser"];
            obj2.tDisponibilidad = 1;
            dao.AddProductoTienda(obj2);
            return(View("AgregarProducto"));
        }