Ejemplo n.º 1
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     if (!filledValues())
     {
         //MessageBox.Show("Complete la información");
     }
     else
     {
         Cursor.Current = Cursors.WaitCursor;
         serviceDA      = new DBControllerWSClient();
         cliente        = (serviceDA.queryByIdCustomer(txtDniRuc.Text));
         Cursor.Current = Cursors.Arrow;
         if (cliente.id != 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");
         }
     }
 }
Ejemplo n.º 2
0
        private void btnEditClient_Click(object sender, EventArgs e)
        {
            int i = dgvClients.CurrentCell.RowIndex;

            if (i >= 0)
            {
                ModificarClienteForm modClient = new ModificarClienteForm();
                modClient.currentCustomer = new customer();
                modClient.currentCustomer = customers[i];
                modClient.ShowDialog();
                updateDataGridView();
            }
            else
            {
                MessageBox.Show("Seleccione un cliente");
            }
        }
Ejemplo n.º 3
0
        private void btnEditClient_Click(object sender, EventArgs e)
        {
            int i = dgvClients.CurrentCell.RowIndex;

            if (i >= 0)
            {
                ModificarClienteForm modClient = new ModificarClienteForm();
                modClient.currentCustomer = new customer();
                customer e1 = new customer();
                serviceDA = new DBControllerWSClient();
                e1        = serviceDA.queryByIdCustomer(dgvClients.Rows[i].Cells[0].Value.ToString());
                modClient.currentCustomer = e1;
                modClient.ShowDialog();
                updateDataGridView();
            }
            else
            {
                MessageBox.Show("Seleccione un cliente");
            }
        }