예제 #1
0
 private void buttonSave_Click(object sender, EventArgs e)
 {
     try
     {
         ServiceReferenceReservations.ReservationsServiceClient se = new ServiceReferenceReservations.ReservationsServiceClient();
         se.insertReservation(textBoxLivreNom.Text, Form1.myuser);
         MessageBox.Show("reservation effectuée");
     }
     catch (Exception ex)
     {
         MessageBox.Show("veuillez vérifier les données entrées  ");
     }
 }
예제 #2
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         ServiceReferenceReservations.ReservationsServiceClient sres = new ServiceReferenceReservations.ReservationsServiceClient();
         gridData.DataSource = null;
         gridData.DataSource = sres.getAllUserReservations(myuser);
         if (gridData != null)
         {
             gridData.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
             gridData.Columns[gridData.ColumnCount - 1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }