private void btn_registrar_Click(object sender, EventArgs e) { WebServiceProducto.WebServiceProductoSoapClient auxServicio = new WebServiceProducto.WebServiceProductoSoapClient(); WebServiceProducto.RegistraSalidaProducto auxRegistrarSalida = new WebServiceProducto.RegistraSalidaProducto(); if (this.txt_cantidad_salida.Text == "") { MessageBox.Show("Rellena el campo cantidad de salida", "Sistema"); return; } if (this.txt_nombre.Text == "") { MessageBox.Show("Rellena el campo nombre", "Sistema"); return; } if (this.txt_salida.Text == "") { MessageBox.Show("Rellena el campo número de salida", "Sistema"); return; } auxRegistrarSalida.Cantidad_salida = Convert.ToInt32(this.txt_cantidad_salida.Text); auxRegistrarSalida.Fecha = Convert.ToDateTime(this.Fecha.Text); auxRegistrarSalida.Sku = this.txt_nombre.Text; auxRegistrarSalida.Numero_salida = Convert.ToInt32(this.txt_salida.Text); auxServicio.RegisterSalidaProduct(auxRegistrarSalida); MessageBox.Show("Registro de salida guardado exitosamente", "Sistema"); }
private void btn_actualizar_Click(object sender, EventArgs e) { WebServiceProducto.WebServiceProductoSoapClient auxServicio = new WebServiceProducto.WebServiceProductoSoapClient(); WebServiceProducto.ConsultaStock auxConsu = new WebServiceProducto.ConsultaStock(); if (this.txt_stock.Text == "") { MessageBox.Show("Rellena el campo stock"); return; } if (this.txt_buscar.Text == "") { MessageBox.Show("Rellena el campo nombre"); return; } if (String.IsNullOrEmpty(auxServicio.BuscarProductoService(this.txt_buscar.Text).Sku)) { MessageBox.Show("Este producto no existe en los registros", "Sistema"); this.txt_buscar.Focus(); return; } auxConsu.Cantidad = Convert.ToInt32(this.txt_stock.Text); auxConsu.Sku = this.txt_buscar.Text; auxServicio.actualizarStockService(auxConsu); MessageBox.Show("Datos modificados exitosamente.", "Sistema"); if ((MessageBox.Show("¿Desea hacer el registro de salida ahora?", "Sistema", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)) { Registro_salida pRegistroSalida = new Registro_salida(); pRegistroSalida.ShowDialog(); System.GC.Collect(); } }
private void btn_registrar_Click(object sender, EventArgs e) { WebServiceProducto.WebServiceProductoSoapClient auxServiceProducto = new WebServiceProducto.WebServiceProductoSoapClient(); WebServiceProducto.ConsultaStock auxConsulta = new WebServiceProducto.ConsultaStock(); if (this.txt_nombre.Text == "") { MessageBox.Show("Rellena el campo nombre", "Sistema"); return; } if (this.txt_cantidad.Text == "") { MessageBox.Show("Rellena el campo cantidad", "Sistema"); return; } if (!String.IsNullOrEmpty(auxServiceProducto.BuscarProductoService(this.txt_nombre.Text).Sku)) { MessageBox.Show("Este producto ya ha sido registrado", "Sistema"); this.txt_nombre.Focus(); return; } else { auxConsulta.Sku = this.txt_nombre.Text; auxConsulta.Cantidad = Convert.ToInt32(this.txt_cantidad.Text); auxServiceProducto.RegisterProduct(auxConsulta); MessageBox.Show("Producto registrado con éxito.", "Sistema"); } }
private void btn_stock_Click(object sender, EventArgs e) { WebServiceProducto.WebServiceProductoSoapClient auxServicio = new WebServiceProducto.WebServiceProductoSoapClient(); if (this.txt_buscar.Text == "") { MessageBox.Show("Rellena el campo de nombre", "Sistema"); return; } if (!String.IsNullOrEmpty(auxServicio.BuscarProductoService(this.txt_buscar.Text).Sku)) { this.DataGriewProducto.DataSource = auxServicio.BuscarStockService(this.txt_buscar.Text); this.DataGriewProducto.DataMember = "Consulta_stock"; } else { MessageBox.Show("Este producto no existe en los registros", "Sistema"); return; } }