コード例 #1
0
 public ActionResult EditSubDomain(SubDomain subDomain)
 {
     if (ModelState.IsValid)
     {
         subDomainService.UpdateSubDomain(subDomain);
         return(RedirectToAction("GetAllSubDomains"));
     }
     else
     {
         return(View(subDomain));
     }
 }
コード例 #2
0
        public ActionResult EditSubDomain(SubDomain subDomain)
        {
            Log.Debug($"Updating {subDomain.Name}");

            if (ModelState.IsValid)
            {
                try
                {
                    subDomainService.UpdateSubDomain(subDomain);
                    return(RedirectToAction("SubDomains"));
                }
                catch (Exception e)
                {
                    Log.Error(e.ToString());
                }
            }

            return(View(subDomain));
        }