添加项目文件。
This commit is contained in:
32
WPFWCSDemo/Services/ManualOperation/InsertTask.cs
Normal file
32
WPFWCSDemo/Services/ManualOperation/InsertTask.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WPFWCSDemo.Models;
|
||||
using WPFWCSDemo.Models.Tables;
|
||||
using WPFWCSDemo.StateCode;
|
||||
using WPFWCSDemo.Utilities;
|
||||
|
||||
namespace WPFWCSDemo.Services.ManualOperation
|
||||
{
|
||||
public class InsertTask : IInsertTask
|
||||
{
|
||||
/// <summary>
|
||||
/// 新插入一条记录
|
||||
/// </summary>
|
||||
/// <param name="taskRT">任务参数模型</param>
|
||||
public void Insert(TaskRT taskRT)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
"INSERT INTO TASK TASKID,PalletId,TASKTYPE,SourceLocation,TARGETLOCATION,CREATETIME " +
|
||||
"VALUES(@TaskId,@PalletId,@TaskType,@SourceLocation,@TargetLocation,@CreateTime)",
|
||||
new System.Data.SqlClient.SqlParameter("@TaskId", taskRT.TaskId),
|
||||
new System.Data.SqlClient.SqlParameter("@PalletId", taskRT.PalletId),
|
||||
new System.Data.SqlClient.SqlParameter("@TaskType", taskRT.TaskType),
|
||||
new System.Data.SqlClient.SqlParameter("@SourceLocation", taskRT.SourceLocation),
|
||||
new System.Data.SqlClient.SqlParameter("@TargetLocation", taskRT.TargetLocation),
|
||||
new System.Data.SqlClient.SqlParameter("@CreateTime", DateTime.Now.ToString(TimeFormat.stringFormatfff)));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user