public ActionResult Add(AddEditFightingArtViewModel vModel) { string message = string.Empty; ApplicationUser authedUser = UserManager.FindById(User.Identity.GetUserId()); IFightingArt newObj = vModel.DataObject; if (newObj.Create(authedUser.GameAccount, authedUser.GetStaffRank(User)) == null) { message = "Error; Creation failed."; } else { LoggingUtility.LogAdminCommandUsage("*WEB* - AddFightingArt[" + newObj.Id.ToString() + "]", authedUser.GameAccount.GlobalIdentityHandle); } return(RedirectToAction("Index", new { Message = message })); }
public ActionResult FightingArtAdd(AddEditFightingArtViewModel vModel) { string message = string.Empty; ApplicationUser authedUser = UserManager.FindById(User.Identity.GetUserId()); IFightingArt newObj = vModel.DataObject; if (newObj.CalculateCostRatio() > 0) { ViewData.Add("Message", "The Calculated Cost must be equal to or below zero."); return(View("~/Views/Manage/FightingArtAdd.cshtml", vModel)); } if (newObj.Create(authedUser.GameAccount, authedUser.GetStaffRank(User)) == null) { message = "Error; Creation failed."; } else { LoggingUtility.LogAdminCommandUsage("*WEB* - AddFightingArt[" + newObj.Id.ToString() + "]", authedUser.GameAccount.GlobalIdentityHandle); } return(RedirectToAction("FightingArts", new { Message = message })); }