private void pasarde0a1() { ServiceVenta.WebServiceVentaSoapClient Aux_negProv = new ServiceVenta.WebServiceVentaSoapClient(); ServiceVenta.Venta new_proc = new ServiceVenta.Venta(); new_proc.Diferenciador = 1; Aux_negProv.ServiceActulizarVent(new_proc); }
private void TablaEst2_Load(object sender, EventArgs e) { // TODO: esta línea de código carga datos en la tabla 'panaderiaDataSetVenta.venta' Puede moverla o quitarla según sea necesario. //this.ventaTableAdapter.Fill(this.panaderiaDataSetVenta.venta); ServiceVenta.WebServiceVentaSoapClient auxNew = new ServiceVenta.WebServiceVentaSoapClient(); this.dataGridView1.DataSource = auxNew.ServiceGetConsultaVenta(); this.dataGridView1.DataMember = "venta"; }
private void button1_Click(object sender, EventArgs e) { try { if (String.IsNullOrEmpty(this.txtIdProducto.Text) || String.IsNullOrEmpty(this.txtCantidad.Text) || String.IsNullOrEmpty(this.txtPagarxProducto.Text)) { MessageBox.Show("No se pueden dejar datos en blanco ", "Mensaje Sistema"); return; } ServiceProducto.WebServiceProductoSoapClient new_procc = new ServiceProducto.WebServiceProductoSoapClient(); int cantidadbsd = new_procc.ServiceGetCantidadP(txtIdProducto.Text); int cantGUI = Convert.ToInt32(txtCantidad.Text); int resta = cantidadbsd - cantGUI; if (cantidadbsd < cantGUI) { MessageBox.Show("Error la cantidad excede la cantidad del stock: " + cantidadbsd, "Mensaje Sistema"); return; } else { new_procc.ServiceSetCantidadP(txtIdProducto.Text, resta); txtRutCliente.ReadOnly = true; ServiceVenta.WebServiceVentaSoapClient Aux_negProv = new ServiceVenta.WebServiceVentaSoapClient(); ServiceVenta.Venta new_proc = new ServiceVenta.Venta(); new_proc.Idproducto = this.txtIdProducto.Text; if (String.IsNullOrEmpty(this.txtRutCliente.Text)) { new_proc.Rutcliente = null; } new_proc.Rutcliente = this.txtRutCliente.Text; new_proc.Cantidad = Convert.ToInt32(this.txtCantidad.Text); new_proc.Total = Convert.ToInt32(this.txtPagarxProducto.Text); new_proc.Diferenciador = 0; Aux_negProv.Serviceinsertarproducto(new_proc); //MessageBox.Show("V ", "Mensaje Sistema"); txtIdProducto.Text = String.Empty; txtPrecioP.Text = String.Empty; txtCantidad.Text = String.Empty; txtPagarxProducto.Text = String.Empty; this.ventaTableAdapter.FillBy(this.panaderiaDataSetVenta.venta); } } catch (Exception ex) { MessageBox.Show("Datos No Guardados " + ex.Message, "Mensaje Sistema"); } }
private void GUImenu_Load(object sender, EventArgs e) { // TODO: esta línea de código carga datos en la tabla 'panaderiaDataSetProducto.producto' Puede moverla o quitarla según sea necesario. ServiceVenta.WebServiceVentaSoapClient obVenta = new ServiceVenta.WebServiceVentaSoapClient(); labelClientesNoRegistrados.Text = " Hay un total de " + obVenta.ServiceGetVentasSinCliente() + " ventas sin un Cliente asociado."; estsumatotal.Text = " En total deberia haber en caja una suma de $" + obVenta.ServiceGetSumaTotaldeVentas() + "."; ServiceProducto.WebServiceProductoSoapClient obtest = new ServiceProducto.WebServiceProductoSoapClient(); txtWarning.Text = obtest.ServiceGetMinDiasV() + " Dias para que el producto con " + obtest.GetName(obtest.ServiceGetMinDiasV()) + " venza."; int canti = obtest.ServiceGetProductMasVendido().Cantidad; int masv = obtest.ServiceGetProductMasVendido().Dias_vencimiento; string nombre = obtest.ServiceGetProductMasVendido().Tipo_producto; string idprod = obtest.ServiceGetProductMasVendido().Idproducto; //2da estadistica int suma = obtest.ServiceGetClienteConMasCompras().Cantidad; string nombre2 = obtest.ServiceGetClienteConMasCompras().Tipo_producto; string rutcliente = obtest.ServiceGetClienteConMasCompras().Caracteristica; int idcliente = obtest.ServiceGetClienteConMasCompras().Precio_unitario; labelCantidadMin.Text = "el producto mas comprado es " + nombre + " de id " + idprod + " con una cantidad de " + canti + " ventas y " + masv + " unidades vendidas"; labelClientesxVentas.Text = " El cliente con mas compras es nombre: " + nombre2 + " RUT: " + rutcliente + " con " + suma + " compras, su id de cliente es " + idcliente; }
private int obtenerSUM() { ServiceVenta.WebServiceVentaSoapClient Aux_negProv = new ServiceVenta.WebServiceVentaSoapClient(); return(Aux_negProv.ServiceGetSum()); }