public ActionResult Create(string id)
 {
     Authority m;
     if (string.IsNullOrEmpty(id))
         m = new Authority();
     else
         m = AuthorityService.instance().GetEnumByID(new Guid(id)).FirstOrDefault();
     return View(m);
 }
 public JsonResult Create(FormCollection form)
 {
     ResultBase_form result = new ResultBase_form();
     Authority m = new Authority();
     TryUpdateModel<Authority>(m, form);
     if (m.ID == Guid.Empty)
         result.status = AuthorityService.instance().Insert(m);
     else
         result.status = AuthorityService.instance().Update(m);
     result.msg = result.status == 0 ? "操作失败" : "操作成功";
     result.ResultURL = "/Authority/Index";
     return Json(result, JsonRequestBehavior.AllowGet);
 }