zhoufan лет назад: 4
Родитель
Сommit
50389c0570

+ 6 - 18
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/Quality/IndexCategoryController.cs

@@ -68,7 +68,7 @@ namespace CallCenterApi.Interface.Controllers.Quality
68 68
         }
69 69
 
70 70
         //添加指标分类
71
-        public ActionResult AddIndexCategory(string categoryName, int sort, int pid=0)
71
+        public ActionResult AddIndexCategory(string categoryName, int sort=0, int pid=0)
72 72
         {
73 73
 
74 74
             Model.T_QC_IndexCategory dModel = new Model.T_QC_IndexCategory();
@@ -77,14 +77,8 @@ namespace CallCenterApi.Interface.Controllers.Quality
77 77
             {
78 78
                 dModel.F_CategoryName = WebHelper.UrlDecode(categoryName.Trim());
79 79
             }
80
-            if (sort>0)
81
-            {
82
-                dModel.F_Sort = sort;
83
-            }
84
-            if (pid>0)
85
-            {
86
-                dModel.F_ParentId = pid;
87
-            }
80
+            dModel.F_Sort = sort;
81
+            dModel.F_ParentId = pid;
88 82
             dModel.F_Score = 0;
89 83
             dModel.F_CreateOn = DateTime.Now;
90 84
             dModel.F_CreateBy = User.F_UserId;
@@ -102,7 +96,7 @@ namespace CallCenterApi.Interface.Controllers.Quality
102 96
         }
103 97
 
104 98
         //编辑指标分类
105
-        public ActionResult EditIndexCategory(int id, string categoryName, int sort, int pid=0)
99
+        public ActionResult EditIndexCategory(int id, string categoryName, int sort = 0, int pid=0)
106 100
         {
107 101
             if (id > 0)
108 102
             {
@@ -114,14 +108,8 @@ namespace CallCenterApi.Interface.Controllers.Quality
114 108
                     {
115 109
                         dModel.F_CategoryName = WebHelper.UrlDecode(categoryName.Trim());
116 110
                     }
117
-                    if (sort > 0)
118
-                    {
119
-                        dModel.F_Sort = sort;
120
-                    }
121
-                    if (pid > 0)
122
-                    {
123
-                        dModel.F_ParentId = pid;
124
-                    }
111
+                    dModel.F_Sort = sort;
112
+                    dModel.F_ParentId = pid;
125 113
                     bool b = dBLL.Update(dModel);
126 114
                     if (b)
127 115
                     {