コード例 #1
0
        public bool PossibleAjouterSection(Salle salle,Section section)
        {
            double airCarreSalle = this.CalculerAirSalle(salle);
            double largeurSection = section.Dimension.Largeur;
            double longueurSection = section.Dimension.Longueur;
            double airCarreSection = largeurSection * longueurSection;

            if (airCarreSalle > airCarreSection)
                return true;

            return true;
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "Id,NoSalle")] Salle salle, Dimension Dimension, Section Section, Taille taille)
 {
     if (ModelState.IsValid)
     {
         //db.Entry(salle).State = EntityState.Modified;
         //db.SaveChanges();
         uow.SalleRepository.UpdateSalle(salle);
         uow.Save();
         return RedirectToAction("Index");
     }
     return View(salle);
 }