/// <summary> ///验证口令 /// </summary> /// <returns></returns> public JsonResult CheckKey(string project, string key) { ReqKeyOperateModel model = new ReqKeyOperateModel(); bool res = model.CheckKey(project, key); return(Json(new { success = res })); }
//验证口令 public JsonResult CheckKey(string key) { ReqKeyOperateModel model = new ReqKeyOperateModel(); bool res = model.CheckKey("ReqRpt00048", key); return(Json(new { successed = res })); }
//验证口令 public JsonResult CheckKey(string key) { ReqKeyOperateModel model = new ReqKeyOperateModel(); bool res = model.CheckKey("ReqRpt00011", key); string msg = res ? "验证成功" : "口令验证失败"; return(Json(new { success = res, msg })); }
//更改口令 public JsonResult UpdateKey(string newKey, string oldKey) { ReqKeyOperateModel model = new ReqKeyOperateModel(); string msg = ""; bool successed = model.CheckKey("ReqRpt00048", oldKey); if (successed) { successed = model.UpdateKey("ReqRpt00048", newKey); msg = successed ? "口令已更新!" : "口令更新出现未知错误,请联系开发人员!"; } else { msg = "口令认证失败!"; } return(Json(new { successed, msg }, JsonRequestBehavior.DenyGet)); }