1
duan
2024-08-21 f71a02229c1ba00fbecaead19256593ffb052753
提交 | 用户 | age
8e1d1f 1 using DIXWeb.Business.GlobalM;
15b421 2 using DIXWeb.Entity.Power;
A 3 using DIXWeb.Entity.Workflow;
8e1d1f 4 using DIXWeb.Web;
A 5 using System;
6 using System.Collections.Generic;
7 using System.Linq;
8 using System.Web;
9 using System.Web.Mvc;
10
11 namespace DIXWeb.Web
12 {
13     public class WorkflowNodeDetailController : BaseMvcController
14     {
15         WorkflowNodeDetailBusiness _workflowNDetailBusiness = new WorkflowNodeDetailBusiness();
16         // GET: GlobalM/WorkflowNodeDetail
17         public ActionResult Index()
18         {
19             return View();
15b421 20         }
A 21
7b83a6 22         public ActionResult GetWorkflowNDetail(int NodeId,int page,int rows)
15b421 23         {
7b83a6 24             Receive receive = this._workflowNDetailBusiness.GetWorkflowNDetail(NodeId,page,rows);
A 25             return Json(receive);
8e1d1f 26         }
A 27
28         public ActionResult GetWorkflowOrgType()
29         {
30             try
31             {
32                 object obj = this._workflowNDetailBusiness.GetWorkflowOrgType();
33                 return Json(new { total = 200, rows = Json(obj).Data });
34             }
35             catch (Exception ex)
36             {
37                 return Json(new { total = 500, rows = ex.Message });
38             }
39         }
40
41         public ActionResult GetWorkflowRoleType()
42         {
43             try
44             {
45                 object obj = this._workflowNDetailBusiness.GetWorkflowRoleType();
46                 return Json(new { total = 200, rows = Json(obj).Data });
47             }
48             catch (Exception ex)
49             {
50                 return Json(new { total = 500, rows = ex.Message });
51             }
52         }
15b421 53
A 54
55         public ActionResult Insert(WorkflowNodeDetail record)
56         {
57             try
58             {
1bf8ef 59                 if (string.IsNullOrEmpty(record.ActiveType)) record.ActiveType = "";
15b421 60                 DateTime now = DateTime.Now;
A 61                 UserInfo ui = Util.SessionHelper.Session["UserInfo"] as UserInfo;
955cd4 62                 record.ChUserId = ui.Id;
A 63                 record.CreateUserId = ui.Id;
15b421 64                 record.CreateTime = now;
A 65                 record.ChTime = now;
66                 this._workflowNDetailBusiness.Insert(record);
67                 return Json(new { total = 200, rows = "SUCCESS" });
68             }
69             catch (Exception ex)
70             {
71                 return Json(new { total = 500, rows = ex.Message });
72             }
73         }
74
75         public ActionResult Update(WorkflowNodeDetail record)
76         {
77             try
78             {
1bf8ef 79                 if (string.IsNullOrEmpty(record.ActiveType)) record.ActiveType = "";
15b421 80                 DateTime now = DateTime.Now;
A 81                 UserInfo ui = Util.SessionHelper.Session["UserInfo"] as UserInfo;
955cd4 82                 record.ChUserId = ui.Id;
15b421 83                 record.ChTime = now;
A 84                 this._workflowNDetailBusiness.Update(record);
85                 return Json(new { total = 200, rows = "SUCCESS" });
86             }
87             catch (Exception ex)
88             {
89                 return Json(new { total = 500, rows = ex.Message });
90             }
91         }
92
93         public ActionResult SelectById(int Id)
94         {
95             try
96             {
97                 ReceiveNodeDetail record = this._workflowNDetailBusiness.SelectById(Id);
98                 return Json(new { total = 200, rows = Json(record).Data });
99             }
100             catch (Exception ex)
101             {
102                 return Json(new { total = 500, rows = ex.Message });
103             }
104         }
8e1d1f 105     }
A 106 }