33 lines
1.3 KiB
C#
33 lines
1.3 KiB
C#
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)));
|
|
}
|
|
}
|
|
}
|