private void btnSearch_Click(object sender, EventArgs e) { if (!filledValues()) { //MessageBox.Show("Complete la información"); } else { Cursor.Current = Cursors.WaitCursor; // dgvFamilies.Rows.Clear(); serviceDAA = new DBControllerWSClient(); familia = (serviceDAA.queryFamilyByCode(txtFamily.Text)); if (familia.idFamily != null) { // dgvFamilies.Rows.Add(new String[] { // familia.idFamily, familia.name, ""+familia.description // }); UpdateFamilyForm updateFamily = new UpdateFamilyForm(); updateFamily.currentFamily = new family(); //family e1 = new family(); //e1 = serviceDAA.queryFamilyByCode(dgvFamilies.Rows[i].Cells[0].Value.ToString()); updateFamily.currentFamily = familia; updateFamily.SetParent(this); updateFamily.ShowDialog(); updateDataGridView(); } else { MessageBox.Show("Familia de Producto no Encontrada"); } Cursor.Current = Cursors.Arrow; } }
private void btnUpdateFamily_Click(object sender, EventArgs e) { UpdateFamilyForm updateForm = new UpdateFamilyForm(); if (updateForm.ShowDialog() == DialogResult.OK) { } componentsState(StateF.Start); }
private void btnUpdateFamily_Click(object sender, EventArgs e) { int i = dgvFamilies.CurrentCell.RowIndex; if (i >= 0) { UpdateFamilyForm updateFamily = new UpdateFamilyForm(); updateFamily.currentFamily = new family(); family e1 = new family(); serviceDAA = new DBControllerWSClient(); e1 = serviceDAA.queryFamilyByCode(dgvFamilies.Rows[i].Cells[0].Value.ToString()); updateFamily.currentFamily = e1; updateFamily.ShowDialog(); updateDataGridView(); } else { MessageBox.Show("Seleccione una familia"); } }