Ejemplo n.º 1
0
 public ActionResult Edit(Location location)
 {
     location.LastUpdatedTimestamp = DateTime.Now;
     location.LastUpdatedBy = User.Pilot().ToString();
     if (!location.ICAO.IsNullOrWhiteSpace()) location.ICAO = location.ICAO.ToUpperInvariant();
     if (ModelState.IsValid)
     {
         db.Entry(location).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(location);
 }
Ejemplo n.º 2
0
 private void PopulateViewBag(Location location)
 {
     this.ViewBag.Country = new SelectList(GetCountriesByIso3166(), "TwoLetterISORegionName", "EnglishName", (location == null) ? (object)null : location.Country);    
 }