/// <summary> /// 增加一个权限,post /// </summary> /// <param name="data"></param> /// <returns></returns> public string AddRight2(Rights data) { try { UserDbContext uc = new UserDbContext("ConnStr1"); uc.AddRight(data); uc.SaveChanges(); //string script = MvcUT.ShowAlertAndHref(this, "增加成功", "AddRight"); return("ok;增加成功"); } catch (Exception ex) { //提示错误信息 string str = MisBase.BaseUT.GetRootException(ex).Message; return("false;" + str); } }