示例#1
0
 public bool EditarProductoGenerico(Entidad producto, String nombreViejo)
 {
     DAOProducto objDataBase = new DAOProducto();
     try
     {
         objDataBase.EditarProductoGenerico(producto, nombreViejo);
     }
     catch (ExcepcionProducto e)
     {
         throw e;
     }
     catch (Exception e)
     {
         throw e;
     }
     return true;
 }
示例#2
0
 public bool EditarProducto(Entidad producto)
 {
     DAOProducto objDataBase = new DAOProducto();
     try
     {
         objDataBase.EditarProducto(producto);
     }
     catch (ExcepcionProducto e)
     {
         throw e;
     }
     catch (Exception e)
     {
         throw e;
     }
     return true;
 }
示例#3
0
 //si
 public List<String> ObtenerCategorias()
 {
     List<String> categorias = new List<String>();
     DAOProducto objDataBase = new DAOProducto();
     try
     {
         categorias = objDataBase.ConsultarCategorias();
     }
     catch (ExcepcionProducto e)
     {
         throw e;
     }
     catch (Exception e)
     {
         throw e;
     }
     return categorias;
 }
示例#4
0
        //si
        public bool AgregarProducto(Entidad producto)
        {
            DAOProducto objDataBase = new DAOProducto();
            try
            {
                //1-Agregar el producto asociado a esa categoria
                objDataBase.AgregarProducto(producto);

                //2-Agregar el detalle_producto asociado al producto y a la marca
                objDataBase.AgregarDetalleProducto(producto);
            }
            catch (ExcepcionProducto e)
            {
                throw e;
            }
            catch (Exception e)
            {
                throw e;
            }
            return true;
        }
示例#5
0
 //
 public List<String> ObtenerMarcas()
 {
     List<String> marcas = new List<String>();
     DAOProducto objDataBase = new DAOProducto();
     try
     {
         marcas = objDataBase.ConsultarMarcas();
     }
     catch (ExcepcionProducto e)
     {
         throw e;
     }
     catch (Exception e)
     {
         throw e;
     }
     return marcas;
 }
示例#6
0
 //
 public List<Entidad> ObtenerProductosDetallados(Entidad productoGenerico)
 {
     List<Entidad> productos = new List<Entidad>();
     DAOProducto objDataBase = new DAOProducto();
     try
     {
         productos = objDataBase.ConsultarProductosDetallados(productoGenerico);
     }
     catch (ExcepcionProducto e)
     {
         throw e;
     }
     catch (Exception e)
     {
         throw e;
     }
     return productos;
 }