private void BtnSearchEmployee_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; serviceDA = new DBControllerWSClient(); venta = (serviceDA.querySaleBySerialCode(txtSerialCode.Text)); Cursor.Current = Cursors.Arrow; if (venta.serialCode != null) { RefundForm modClient = new RefundForm(); modClient.CurrentSale = new sale(); serviceDA = new DBControllerWSClient(); modClient.CurrentSale = venta; modClient.SetParent(this); modClient.ShowDialog(); updateDataGridView(); } else { MessageBox.Show("Cliente no encontrado"); } /* * * if (!filledValues()) * { * //MessageBox.Show("Complete la información"); * } * else * { * Cursor.Current = Cursors.WaitCursor; * serviceDA = new DBControllerWSClient(); * sale sale = (serviceDA.querySaleBySerialCode(txtSerialCode.Text)); * Cursor.Current = Cursors.Arrow; * if (sale.totalSale != null) * { * RefundForm refForm = new RefundForm(); * refForm.CurrentSale = new sale(); * serviceDA = new DBControllerWSClient(); * refForm.CurrentSale = sale; * refForm.SetParent(this); * refForm.ShowDialog(); * updateDataGridView(); * } * else * { * MessageBox.Show("Cliente no encontrado"); * } * * }*/ }