|
|
@@ -46,9 +46,9 @@ namespace RMYY_CallCenter_Api.DAL
|
|
46
|
46
|
{
|
|
47
|
47
|
StringBuilder strSql=new StringBuilder();
|
|
48
|
48
|
strSql.Append("select count(1) from T_FaultRepair_Process");
|
|
49
|
|
- strSql.Append(" where F_ProcessId=SQL2012F_ProcessId");
|
|
|
49
|
+ strSql.Append(" where F_ProcessId=@F_ProcessId");
|
|
50
|
50
|
SqlParameter[] parameters = {
|
|
51
|
|
- new SqlParameter("SQL2012F_ProcessId", SqlDbType.Int,4)
|
|
|
51
|
+ new SqlParameter("@F_ProcessId", SqlDbType.Int,4)
|
|
52
|
52
|
};
|
|
53
|
53
|
parameters[0].Value = F_ProcessId;
|
|
54
|
54
|
|
|
|
@@ -65,18 +65,18 @@ namespace RMYY_CallCenter_Api.DAL
|
|
65
|
65
|
strSql.Append("insert into T_FaultRepair_Process(");
|
|
66
|
66
|
strSql.Append("F_WorkOrderCode,F_Maintenancer,F_MaintenanceDept,F_ProcessingTime,F_Result,F_File,F_ReturnReason,F_Isdelete,F_UpdateTime)");
|
|
67
|
67
|
strSql.Append(" values (");
|
|
68
|
|
- strSql.Append("SQL2012F_WorkOrderCode,SQL2012F_Maintenancer,SQL2012F_MaintenanceDept,SQL2012F_ProcessingTime,SQL2012F_Result,SQL2012F_File,SQL2012F_ReturnReason,SQL2012F_Isdelete,SQL2012F_UpdateTime)");
|
|
|
68
|
+ strSql.Append("@F_WorkOrderCode,@F_Maintenancer,@F_MaintenanceDept,@F_ProcessingTime,@F_Result,@F_File,@F_ReturnReason,@F_Isdelete,@F_UpdateTime)");
|
|
69
|
69
|
strSql.Append(";select @@IDENTITY");
|
|
70
|
70
|
SqlParameter[] parameters = {
|
|
71
|
|
- new SqlParameter("SQL2012F_WorkOrderCode", SqlDbType.NVarChar,100),
|
|
72
|
|
- new SqlParameter("SQL2012F_Maintenancer", SqlDbType.NVarChar,100),
|
|
73
|
|
- new SqlParameter("SQL2012F_MaintenanceDept", SqlDbType.NVarChar,100),
|
|
74
|
|
- new SqlParameter("SQL2012F_ProcessingTime", SqlDbType.DateTime),
|
|
75
|
|
- new SqlParameter("SQL2012F_Result", SqlDbType.NVarChar,500),
|
|
76
|
|
- new SqlParameter("SQL2012F_File", SqlDbType.NVarChar,500),
|
|
77
|
|
- new SqlParameter("SQL2012F_ReturnReason", SqlDbType.NVarChar,500),
|
|
78
|
|
- new SqlParameter("SQL2012F_Isdelete", SqlDbType.Int,4),
|
|
79
|
|
- new SqlParameter("SQL2012F_UpdateTime", SqlDbType.DateTime)};
|
|
|
71
|
+ new SqlParameter("@F_WorkOrderCode", SqlDbType.NVarChar,100),
|
|
|
72
|
+ new SqlParameter("@F_Maintenancer", SqlDbType.NVarChar,100),
|
|
|
73
|
+ new SqlParameter("@F_MaintenanceDept", SqlDbType.NVarChar,100),
|
|
|
74
|
+ new SqlParameter("@F_ProcessingTime", SqlDbType.DateTime),
|
|
|
75
|
+ new SqlParameter("@F_Result", SqlDbType.NVarChar,500),
|
|
|
76
|
+ new SqlParameter("@F_File", SqlDbType.NVarChar,500),
|
|
|
77
|
+ new SqlParameter("@F_ReturnReason", SqlDbType.NVarChar,500),
|
|
|
78
|
+ new SqlParameter("@F_Isdelete", SqlDbType.Int,4),
|
|
|
79
|
+ new SqlParameter("@F_UpdateTime", SqlDbType.DateTime)};
|
|
80
|
80
|
parameters[0].Value = model.F_WorkOrderCode;
|
|
81
|
81
|
parameters[1].Value = model.F_Maintenancer;
|
|
82
|
82
|
parameters[2].Value = model.F_MaintenanceDept;
|
|
|
@@ -104,27 +104,27 @@ namespace RMYY_CallCenter_Api.DAL
|
|
104
|
104
|
{
|
|
105
|
105
|
StringBuilder strSql=new StringBuilder();
|
|
106
|
106
|
strSql.Append("update T_FaultRepair_Process set ");
|
|
107
|
|
- strSql.Append("F_WorkOrderCode=SQL2012F_WorkOrderCode,");
|
|
108
|
|
- strSql.Append("F_Maintenancer=SQL2012F_Maintenancer,");
|
|
109
|
|
- strSql.Append("F_MaintenanceDept=SQL2012F_MaintenanceDept,");
|
|
110
|
|
- strSql.Append("F_ProcessingTime=SQL2012F_ProcessingTime,");
|
|
111
|
|
- strSql.Append("F_Result=SQL2012F_Result,");
|
|
112
|
|
- strSql.Append("F_File=SQL2012F_File,");
|
|
113
|
|
- strSql.Append("F_ReturnReason=SQL2012F_ReturnReason,");
|
|
114
|
|
- strSql.Append("F_Isdelete=SQL2012F_Isdelete,");
|
|
115
|
|
- strSql.Append("F_UpdateTime=SQL2012F_UpdateTime");
|
|
116
|
|
- strSql.Append(" where F_ProcessId=SQL2012F_ProcessId");
|
|
|
107
|
+ strSql.Append("F_WorkOrderCode=@F_WorkOrderCode,");
|
|
|
108
|
+ strSql.Append("F_Maintenancer=@F_Maintenancer,");
|
|
|
109
|
+ strSql.Append("F_MaintenanceDept=@F_MaintenanceDept,");
|
|
|
110
|
+ strSql.Append("F_ProcessingTime=@F_ProcessingTime,");
|
|
|
111
|
+ strSql.Append("F_Result=@F_Result,");
|
|
|
112
|
+ strSql.Append("F_File=@F_File,");
|
|
|
113
|
+ strSql.Append("F_ReturnReason=@F_ReturnReason,");
|
|
|
114
|
+ strSql.Append("F_Isdelete=@F_Isdelete,");
|
|
|
115
|
+ strSql.Append("F_UpdateTime=@F_UpdateTime");
|
|
|
116
|
+ strSql.Append(" where F_ProcessId=@F_ProcessId");
|
|
117
|
117
|
SqlParameter[] parameters = {
|
|
118
|
|
- new SqlParameter("SQL2012F_WorkOrderCode", SqlDbType.NVarChar,100),
|
|
119
|
|
- new SqlParameter("SQL2012F_Maintenancer", SqlDbType.NVarChar,100),
|
|
120
|
|
- new SqlParameter("SQL2012F_MaintenanceDept", SqlDbType.NVarChar,100),
|
|
121
|
|
- new SqlParameter("SQL2012F_ProcessingTime", SqlDbType.DateTime),
|
|
122
|
|
- new SqlParameter("SQL2012F_Result", SqlDbType.NVarChar,500),
|
|
123
|
|
- new SqlParameter("SQL2012F_File", SqlDbType.NVarChar,500),
|
|
124
|
|
- new SqlParameter("SQL2012F_ReturnReason", SqlDbType.NVarChar,500),
|
|
125
|
|
- new SqlParameter("SQL2012F_Isdelete", SqlDbType.Int,4),
|
|
126
|
|
- new SqlParameter("SQL2012F_UpdateTime", SqlDbType.DateTime),
|
|
127
|
|
- new SqlParameter("SQL2012F_ProcessId", SqlDbType.Int,4)};
|
|
|
118
|
+ new SqlParameter("@F_WorkOrderCode", SqlDbType.NVarChar,100),
|
|
|
119
|
+ new SqlParameter("@F_Maintenancer", SqlDbType.NVarChar,100),
|
|
|
120
|
+ new SqlParameter("@F_MaintenanceDept", SqlDbType.NVarChar,100),
|
|
|
121
|
+ new SqlParameter("@F_ProcessingTime", SqlDbType.DateTime),
|
|
|
122
|
+ new SqlParameter("@F_Result", SqlDbType.NVarChar,500),
|
|
|
123
|
+ new SqlParameter("@F_File", SqlDbType.NVarChar,500),
|
|
|
124
|
+ new SqlParameter("@F_ReturnReason", SqlDbType.NVarChar,500),
|
|
|
125
|
+ new SqlParameter("@F_Isdelete", SqlDbType.Int,4),
|
|
|
126
|
+ new SqlParameter("@F_UpdateTime", SqlDbType.DateTime),
|
|
|
127
|
+ new SqlParameter("@F_ProcessId", SqlDbType.Int,4)};
|
|
128
|
128
|
parameters[0].Value = model.F_WorkOrderCode;
|
|
129
|
129
|
parameters[1].Value = model.F_Maintenancer;
|
|
130
|
130
|
parameters[2].Value = model.F_MaintenanceDept;
|
|
|
@@ -155,9 +155,9 @@ namespace RMYY_CallCenter_Api.DAL
|
|
155
|
155
|
|
|
156
|
156
|
StringBuilder strSql=new StringBuilder();
|
|
157
|
157
|
strSql.Append("delete from T_FaultRepair_Process ");
|
|
158
|
|
- strSql.Append(" where F_ProcessId=SQL2012F_ProcessId");
|
|
|
158
|
+ strSql.Append(" where F_ProcessId=@F_ProcessId");
|
|
159
|
159
|
SqlParameter[] parameters = {
|
|
160
|
|
- new SqlParameter("SQL2012F_ProcessId", SqlDbType.Int,4)
|
|
|
160
|
+ new SqlParameter("@F_ProcessId", SqlDbType.Int,4)
|
|
161
|
161
|
};
|
|
162
|
162
|
parameters[0].Value = F_ProcessId;
|
|
163
|
163
|
|
|
|
@@ -199,9 +199,9 @@ namespace RMYY_CallCenter_Api.DAL
|
|
199
|
199
|
|
|
200
|
200
|
StringBuilder strSql=new StringBuilder();
|
|
201
|
201
|
strSql.Append("select top 1 F_ProcessId,F_WorkOrderCode,F_Maintenancer,F_MaintenanceDept,F_ProcessingTime,F_Result,F_File,F_ReturnReason,F_Isdelete,F_UpdateTime from T_FaultRepair_Process ");
|
|
202
|
|
- strSql.Append(" where F_ProcessId=SQL2012F_ProcessId");
|
|
|
202
|
+ strSql.Append(" where F_ProcessId=@F_ProcessId");
|
|
203
|
203
|
SqlParameter[] parameters = {
|
|
204
|
|
- new SqlParameter("SQL2012F_ProcessId", SqlDbType.Int,4)
|
|
|
204
|
+ new SqlParameter("@F_ProcessId", SqlDbType.Int,4)
|
|
205
|
205
|
};
|
|
206
|
206
|
parameters[0].Value = F_ProcessId;
|
|
207
|
207
|
|
|
|
@@ -360,13 +360,13 @@ namespace RMYY_CallCenter_Api.DAL
|
|
360
|
360
|
public DataSet GetList(int PageSize,int PageIndex,string strWhere)
|
|
361
|
361
|
{
|
|
362
|
362
|
SqlParameter[] parameters = {
|
|
363
|
|
- new SqlParameter("SQL2012tblName", SqlDbType.VarChar, 255),
|
|
364
|
|
- new SqlParameter("SQL2012fldName", SqlDbType.VarChar, 255),
|
|
365
|
|
- new SqlParameter("SQL2012PageSize", SqlDbType.Int),
|
|
366
|
|
- new SqlParameter("SQL2012PageIndex", SqlDbType.Int),
|
|
367
|
|
- new SqlParameter("SQL2012IsReCount", SqlDbType.Bit),
|
|
368
|
|
- new SqlParameter("SQL2012OrderType", SqlDbType.Bit),
|
|
369
|
|
- new SqlParameter("SQL2012strWhere", SqlDbType.VarChar,1000),
|
|
|
363
|
+ new SqlParameter("@tblName", SqlDbType.VarChar, 255),
|
|
|
364
|
+ new SqlParameter("@fldName", SqlDbType.VarChar, 255),
|
|
|
365
|
+ new SqlParameter("@PageSize", SqlDbType.Int),
|
|
|
366
|
+ new SqlParameter("@PageIndex", SqlDbType.Int),
|
|
|
367
|
+ new SqlParameter("@IsReCount", SqlDbType.Bit),
|
|
|
368
|
+ new SqlParameter("@OrderType", SqlDbType.Bit),
|
|
|
369
|
+ new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
|
|
370
|
370
|
};
|
|
371
|
371
|
parameters[0].Value = "T_FaultRepair_Process";
|
|
372
|
372
|
parameters[1].Value = "F_ProcessId";
|