// Retorna todos los productos private void btnListar_Click(object sender, EventArgs e) { try { WebServiceProductoSoapClient auxProducto = new WebServiceProductoSoapClient(); String filtro = "NombreProducto"; this.dataGridViewListaProductos.DataSource = auxProducto.SListaProducto(filtro, true); } catch (Exception ex) { Console.WriteLine("Error al listar Productos " + ex + "\n"); } }
// Retorna los productos actuales para su uso private DataTable BuscaProductos() { try { WebServiceProductoSoapClient auxProducto = new WebServiceProductoSoapClient(); String filtro = "SkuProducto"; return(auxProducto.SListaProducto(filtro, true)); } catch (Exception ex) { MessageBox.Show("UwU!" + "\n" + "Hay problemas el modulo productos, deberia volver a ingresar"); Console.WriteLine("Problemas con Producto " + ex + "\n"); return(null); } }
// Lista todos los productos al entrar al usuario private void PantallaListarProductos_Load(object sender, EventArgs e) { DataTable dt = new DataTable(); try { WebServiceProductoSoapClient auxProducto = new WebServiceProductoSoapClient(); String filtro = "NombreProducto"; this.dataGridViewListaProductos.DataSource = auxProducto.SListaProducto(filtro, true); } catch (Exception ex) { MessageBox.Show("UwU!" + "\n" + "Hay problemas con su sesion, deberia volver a ingresar"); Console.WriteLine("Problemas con la sesion " + ex + "\n"); } }