Example #1
0
 private void btReserver_Click(object sender, EventArgs e)
 {
     if (dataGridView1.CurrentRow.Index != -1)
     {
         PFE.Reservations.AjouterReservation reserve = new PFE.Reservations.AjouterReservation();
         int id_imm = Convert.ToInt32(dataGridView1.CurrentRow.Cells["Number"].Value);
         reserve.getIdImmobilier(id_imm);
         this.Hide();
         reserve.Show();
     }
     else
     {
         MessageBox.Show("Veuillez choisir un element parmi la liste");
     }
 }
 private void button1_Click(object sender, EventArgs e)
 {
     if (dataGridView1.CurrentRow.Index != -1)
     {
         int id_imm = Convert.ToInt32(dataGridView1.CurrentRow.Cells["Number"].Value);
         PFE.Entities.Reservations           Objimm   = db.Reservations.Where(c => c.id_reservations == id_imm).First();
         PFE.Reservations.AjouterReservation resModif = new PFE.Reservations.AjouterReservation();
         resModif.remplirChampUpdate(Objimm);
         this.Hide();
         resModif.Show();
     }
     else
     {
         MessageBox.Show("Veuillez choisir un element parmi la liste");
     }
 }
 private void ajouterReservationToolStripMenuItem_Click(object sender, EventArgs e)
 {
     PFE.Reservations.AjouterReservation f = new PFE.Reservations.AjouterReservation();
     f.Show();
 }