예제 #1
0
        public ActionResult Edit( int id, TariffModel 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 );
        }