Exemplo n.º 1
0
 public IActionResult Edit(Office model)
 {
     if (HttpContext.Session.GetString("ID") == null)
     {
         return(RedirectToAction("Login", "Admin"));
     }
     else
     {
         if (ModelState.IsValid)
         {
             officeRepository.Edit(model);
             return(RedirectToAction("Index"));
         }
         ViewBag.listAllCitiess = officeRepository.listAllCities();
         return(View(model));
     }
 }