コード例 #1
0
 private void btnAlquilar_Click(object sender, EventArgs e)
 {
     try
     {
         if (cboxEstacion.SelectedItem == null)
         {
             service.ReturnScooter("");
         }
         else
         {
             service.RentScooter(cboxEstacion.SelectedItem.ToString());
         }
         MessageBox.Show(this, "Alquiler realizado con exito", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     catch (ServiceException serviceException)
     {
         MessageBox.Show(this, serviceException.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }