Пример #1
0
 public Reservation(String numero, Client client, Chambre chambre, double montant, String description, String arrive, String depart)
 {
     this.numero      = numero;
     this.client      = client;
     this.chambre     = chambre;
     this.montant     = montant;
     this.description = description;
     this.arrive      = arrive;
     this.depart      = depart;
 }
Пример #2
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         int     i    = int.Parse(textBox2.Text.Trim());
         Chambre cham = db.Chambre.FirstOrDefault(x => x.NumChambre == i);
         cham.Etage       = int.Parse(textBox3.Text);
         cham.typechambre = comboBox1.Text;
         db.SaveChanges();
         this.chambreTableAdapter.Fill(this.photelDataSet.Chambre);
     }
     catch (Exception)
     {
         MessageBox.Show("!!!");
     }
 }
Пример #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         Chambre cham = new Chambre();
         cham.NumChambre  = int.Parse(textBox2.Text);
         cham.Etage       = int.Parse(textBox3.Text);
         cham.typechambre = comboBox1.Text;
         cham.Prixchambre = Decimal.Parse(tb_prix.Text);
         db.Chambre.Add(cham);
         db.SaveChanges();
         this.chambreTableAdapter.Fill(this.photelDataSet.Chambre);
     }
     catch (Exception)
     {
         MessageBox.Show("verifier les informations!");
     }
 }