private void btnSearch_Click(object sender, EventArgs e) { try { Cursor.Current = Cursors.WaitCursor; serviceDAA = new DBControllerWSClient(); premises local = serviceDAA.queryPremisesByDescription(txtDesc.Text); if (local.address != null) { Modificar_Local updateForm1 = new Modificar_Local(); updateForm1.currentLocal = new premises(); updateForm1.currentLocal = local; updateForm1.SetParent(this); updateForm1.ShowDialog(); updateDataGridView(); } else { MessageBox.Show("No existe un local con ese nombre"); } } catch { MessageBox.Show("No existe el usuario"); updateDataGridView(); } }
private void btnModLocal_Click(object sender, EventArgs e) { Modificar_Local modLocal = new Modificar_Local(); modLocal.SetParent(this); modLocal.ShowDialog(); }
private void btnModLocal_Click(object sender, EventArgs e) { int i = dgvLocal.CurrentCell.RowIndex; if (i >= 0) { Modificar_Local modLocal = new Modificar_Local(); modLocal.currentLocal = new premises(); premises l1 = new premises(); serviceDAA = new View.MateWSLocal.DBControllerWSClient(); l1 = serviceDAA.queryPremisesByDescription(dgvLocal.Rows[i].Cells[1].Value.ToString()); modLocal.currentLocal = l1; modLocal.ShowDialog(); updateDataGridView(); } else { MessageBox.Show("Seleccione un local"); } }