private void btnSave_Click(object sender, EventArgs e) { if (!filledValues()) { //MessageBox.Show("Complete la información"); } else { product p = new product(); p.brand = brands[cboBrand.SelectedIndex]; p.family = families[cboFamily.SelectedIndex]; p.discount = discounts[cboDiscount.SelectedIndex]; p.SKUcode = txtSKUCode.Text; p.name = txtName.Text; p.productDescription = txtDescription.Text; p.productCareDescription = txtCareDescription.Text; p.state = 1; p.salePrice = float.Parse(txtSalePrice.Text); p.purchasePrice = float.Parse(txtPurchasePrice.Text); p.igv = float.Parse(txtIGV.Text); p.stock = int.Parse(txtStock.Text); serviceDA = new DBControllerWSClient(); Cursor.Current = Cursors.WaitCursor; serviceDA.insertProduct(p); Cursor.Current = Cursors.Arrow; MessageBox.Show("El producto se guardó satisfactoriamente"); this.Close(); } }