private void btnSearchEmployee_Click(object sender, EventArgs e) { if (!filledValues()) { MessageBox.Show("Complete la información"); } else { Cursor.Current = Cursors.WaitCursor; serviceDA = new DBControllerWSClient(); compra = (serviceDA.queryPurchaseBySerialCode(txtSerialCode.Text)); Cursor.Current = Cursors.Arrow; if (compra.serialCode != null) { dgvPurchases.Rows.Clear(); dgvPurchases.Rows.Add(new String[] { "" + compra.serialCode, "" + compra.totalPurchase, "" + compra.supplier.name, "" + compra.creationDate }); } else { MessageBox.Show("Compra no encontrada"); } } /* * 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) * { * ModificarClienteForm modClient = new ModificarClienteForm(); * modClient.currentCustomer = new customer(); * serviceDA = new DBControllerWSClient(); * modClient.currentCustomer = cliente; * modClient.SetParent(this); * modClient.ShowDialog(); * updateDataGridView(); * * * } * else * { * MessageBox.Show("Cliente no encontrado"); * } * * }*/ }