| | |
| | | for (int i = 0; i < dt.Rows.Count; i++) |
| | | { |
| | | //关闭工单对应工序任务 |
| | | sql = @"update TK_Wrk_Step set status='CLOSED' where wo_code=@wocode"; |
| | | sql = @"update TK_Wrk_Step set status='START' where wo_code=@wocode"; |
| | | list.Add(new { str = sql, parm = new { wocode = dt.Rows[i]["WO_CODE"].ToString() } }); |
| | | //回写工单表状态为(关闭) |
| | | sql = @"update TK_Wrk_Man set status='CLOSED',closeuser=@username,closedate=@closedate where wo_code=@wocode"; |
| | | sql = @"update TK_Wrk_Man set status='START',closeuser=@username,closedate=@closedate where wo_code=@wocode"; |
| | | list.Add(new { str = sql, parm = new { wocode = dt.Rows[i]["WO_CODE"].ToString(), username = username, closedate = DateTime.Now.ToString() } }); |
| | | } |
| | | bool aa = DapperHelper.DoTransaction(list); |