From 09c2292a34980beff332c65239b68e9c619a9663 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期一, 25 七月 2022 15:15:58 +0800 Subject: [PATCH] 文书管理 --- zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 60 insertions(+), 0 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs b/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs index c123f4c..d611613 100644 --- a/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/SysCodeController.cs @@ -781,6 +781,66 @@ /// <returns></returns> [HttpPost] + public string addquestiontypes(SysCodeDtlEntity data) + { + var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); + ResultEntity resultEntity = new ResultEntity(); + resultEntity.Result = false; + ViewData["curentuser"] = curentuser; + data.RecStatus = "A"; + if (String.IsNullOrEmpty(data.Id)) + { + data.Creater = curentuser.Id; + data.Createtime = DateTime.Now; + } + data.Modifier = curentuser.Id; + data.Modifytime = DateTime.Now; + if (data.CodeSns == null || data.CodeSns.Length == 0) + { + resultEntity.Result = false; + resultEntity.Message = "娉曞緥渚濇嵁涓嶈兘涓虹┖锛�"; + return JsonConvert.SerializeObject(resultEntity); + } + foreach (var CodeSn in data.CodeSns) + { + if (string.IsNullOrWhiteSpace(CodeSn)) + { + resultEntity.Result = false; + resultEntity.Message = "缂栫爜涓嶈兘涓虹┖锛�"; + return JsonConvert.SerializeObject(resultEntity); + } + } + if (data.Commentss == null || data.Commentss.Length == 0) + { + resultEntity.Result = false; + resultEntity.Message = "娉曞緥鍚嶇О涓嶈兘涓虹┖锛�"; + return JsonConvert.SerializeObject(resultEntity); + } + foreach (var Comment in data.Commentss) + { + if (string.IsNullOrWhiteSpace(Comment)) + { + resultEntity.Result = false; + resultEntity.Message = "娉曞緥鍚嶇О涓嶈兘涓虹┖锛�"; + return JsonConvert.SerializeObject(resultEntity); + } + } + + + resultEntity = _sysCodeService.addSysCodeDtls(data); + + return JsonConvert.SerializeObject(resultEntity); + } + + + + /// <summary> + /// 淇濆瓨 + /// </summary> + /// <param name="data">宀椾綅瀹炰綋绫诲璞�</param> + /// <returns></returns> + [HttpPost] + public string Savequestiontypes(SysCodeDtlEntity data) { var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); -- Gitblit v1.9.1