예제 #1
0
 public ActionResult Edit( int id, AgentModel model )
 {
     try
     {
         IUser currentUser = Authorization.GetAuthroizedUser();
         if ( currentUser.IsSuperuser() && ModelState.IsValid )
         {
             model.Update( id, model );
             return RedirectToAction( "Index" );
         }
     }
     catch
     {
         return RedirectToAction( "Index" );
     }
     return View( model );
 }