public ActionResult AddOrUpdateAuthority(FormCollection formCollection, AuthorityContract authorityContract)
 {
     if (ModelState.IsValid)
     {
         //定义变量存储结果
         bool boo = true;
         //验证数据是否重复
         if (!authorityServices.IsExists(authorityTag: authorityContract.AuthorityTag, id: authorityContract.AuthorityID.ToString()))
         {
             //执行失败信息
             ViewData["msg"] = "功能点标识数据重复!请重新填写功能点标识!";
             //失败视图
             return View("Error");
         }
         boo = formCollection["AuthorityID"] != null ? authorityServices.UpdateAuthority(authorityContract: authorityContract) : authorityServices.AddAuthority(authorityContract: authorityContract);
         //执行结果判断
         if (boo)
         {
             //执行成功信息
             ViewData["msg"] = "功能点操作成功!";
             //成功后要跳转的路径(如果无须跳转,直接留在当前页面,不写即可)
             ViewData["url"] = new UrlHelper(Request.RequestContext).Action("AuthorityList");
             //成功视图
             return View("Success");
         }
         else
         {
             //执行失败信息
             ViewData["msg"] = "功能点操作失败!";
             //失败视图
             return View("Error");
         }
     }
     return View(authorityContract);
 }
 /// <summary>
 /// 功能节点管理页面(新增或者编辑)
 /// </summary>
 /// <param name="tag"></param>
 /// <param name="id"></param>
 /// <returns></returns>
 public ActionResult AddOrUpdateAuthority(string id)
 {
     AuthorityContract authorityContract = new AuthorityContract();
     if (!string.IsNullOrEmpty(id))
     {
         authorityContract = authorityServices.GetAuthortityEntityById(id);
     }
     return View(authorityContract);
 }
 /// <summary>
 /// 添加功能点
 /// </summary>
 /// <param name="authorityContract"></param>
 /// <returns></returns>
 public bool AddAuthority(AuthorityContract authorityContract)
 {
     Authority authority = authorityContract.ToPO<Authority>();
     return authorityRepository.AddAuthority(authority: authority);
 }