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; }
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; }
//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; }
//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; }
// 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; }
// 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; }