Ver Código Fonte

新增验证

zhoufan 3 anos atrás
pai
commit
a8d1cb3746

+ 13 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/WebController.cs

@@ -1449,6 +1449,19 @@ namespace CallCenterApi.Interface.Controllers
1449 1449
             int isprotect = RequestString.GetInt("isprotect", 0);
1450 1450
             int level = RequestString.GetInt("level", 0);
1451 1451
 
1452
+            if (string.IsNullOrEmpty(conphone))
1453
+            {
1454
+                return Error("联系电话不能为空");
1455
+            }
1456
+            if (string.IsNullOrEmpty(title))
1457
+            {
1458
+                return Error("标题不能为空");
1459
+            }
1460
+            if (string.IsNullOrEmpty(content))
1461
+            {
1462
+                return Error("内容不能为空");
1463
+            }
1464
+
1452 1465
             string workid = string.Empty;
1453 1466
             string pwd = string.Empty; ;
1454 1467
             //using (TransactionScope trans = new TransactionScope())