Пример #1
0
 private void btnSaveClient_Click(object sender, EventArgs e)
 {
     if (!filledValues())
     {
         //MessageBox.Show("Complete la información");
     }
     else
     {
         //getCustomerData
         customer c = new customer();
         c.id = txtClienteID.Text;
         c.descriptionCustomer = txtDesc.Text;
         c.address             = txtAddress.Text;
         c.occupation          = txtOccupation.Text;
         c.email          = txtEmail.Text;
         c.phone          = txtPhone.Text;
         c.kindOfCustomer = cbTipoCliente.Text;
         c.state          = 1;
         serviceDA        = new DBControllerWSClient();
         Cursor.Current   = Cursors.WaitCursor;
         serviceDA.insertCustomer(c);
         Cursor.Current = Cursors.Arrow;
         MessageBox.Show("El cliente se agregó satisfactoriamente");
         this.Close();
     }
 }