109 lines
3.6 KiB
C#
109 lines
3.6 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Collections;
|
|||
|
|
|||
|
namespace BLL
|
|||
|
{
|
|||
|
public class HJGL_BO_BatchService
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
/// <param name="batchId"></param>
|
|||
|
/// <returns></returns>
|
|||
|
public static Model.HJGL_BO_Batch GetBatchById(string batchId)
|
|||
|
{
|
|||
|
return Funs.DB.HJGL_BO_Batch.FirstOrDefault(e => e.BatchId == batchId);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 修改批主表批关闭状态
|
|||
|
/// </summary>
|
|||
|
/// <param name="batch"></param>
|
|||
|
public static void UpdateBatchIsClosed(Model.HJGL_BO_Batch batch)
|
|||
|
{
|
|||
|
Model.HJGL_BO_Batch newBatch = Funs.DB.HJGL_BO_Batch.FirstOrDefault(e => e.BatchId == batch.BatchId);
|
|||
|
if (newBatch != null)
|
|||
|
{
|
|||
|
newBatch.BatchIsClosed = batch.BatchIsClosed;
|
|||
|
newBatch.BatchCloseDate = batch.BatchCloseDate;
|
|||
|
Funs.DB.SubmitChanges();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 添加
|
|||
|
/// </summary>
|
|||
|
/// <param name="check"></param>
|
|||
|
public static void AddBatch(Model.HJGL_BO_Batch batch)
|
|||
|
{
|
|||
|
Model.SGGLDB db = Funs.DB;
|
|||
|
Model.HJGL_BO_Batch newBatch = new Model.HJGL_BO_Batch();
|
|||
|
newBatch.BatchId = batch.BatchId;
|
|||
|
newBatch.BatchCode = batch.BatchCode;
|
|||
|
newBatch.BatchCondition = batch.BatchCondition;
|
|||
|
newBatch.ProjectId = batch.ProjectId;
|
|||
|
newBatch.InstallationId = batch.InstallationId;
|
|||
|
newBatch.NDTR_ID = batch.NDTR_ID;
|
|||
|
newBatch.JOTY_ID = batch.JOTY_ID;
|
|||
|
|
|||
|
newBatch.ISC_ID = batch.ISC_ID;
|
|||
|
newBatch.STE_ID = batch.STE_ID;
|
|||
|
newBatch.ExecStandardId = batch.ExecStandardId;
|
|||
|
newBatch.IsSpecial = batch.IsSpecial;
|
|||
|
|
|||
|
newBatch.WED_ID = batch.WED_ID;
|
|||
|
newBatch.ISO_ID = batch.ISO_ID;
|
|||
|
newBatch.SER_ID = batch.SER_ID;
|
|||
|
newBatch.TestPackage = batch.TestPackage;
|
|||
|
newBatch.BatchStartDate = batch.BatchStartDate;
|
|||
|
|
|||
|
db.HJGL_BO_Batch.InsertOnSubmit(newBatch);
|
|||
|
db.SubmitChanges();
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 修改
|
|||
|
/// </summary>
|
|||
|
/// <param name="check"></param>
|
|||
|
public static void UpdateBatch(Model.HJGL_BO_Batch batch)
|
|||
|
{
|
|||
|
Model.SGGLDB db = Funs.DB;
|
|||
|
Model.HJGL_BO_Batch newCheck = db.HJGL_BO_Batch.FirstOrDefault(e => e.BatchId == batch.BatchId);
|
|||
|
newCheck.AskCompleteDate = batch.AskCompleteDate;
|
|||
|
newCheck.SubmitAskDate = batch.SubmitAskDate;
|
|||
|
newCheck.IsPrint = batch.IsPrint;
|
|||
|
newCheck.IsPrintRTTestingResult = batch.IsPrintRTTestingResult;
|
|||
|
db.SubmitChanges();
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 修改
|
|||
|
/// </summary>
|
|||
|
/// <param name="check"></param>
|
|||
|
public static void UpdateBatchReportFeedback(Model.HJGL_BO_Batch batch)
|
|||
|
{
|
|||
|
Model.SGGLDB db = Funs.DB;
|
|||
|
Model.HJGL_BO_Batch newCheck = db.HJGL_BO_Batch.FirstOrDefault(e => e.BatchId == batch.BatchId);
|
|||
|
newCheck.ReportFeedback = batch.ReportFeedback;
|
|||
|
db.SubmitChanges();
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 删除
|
|||
|
/// </summary>
|
|||
|
/// <param name="checkId"></param>
|
|||
|
public static void DeleteBatch(string batchId)
|
|||
|
{
|
|||
|
Model.SGGLDB db = Funs.DB;
|
|||
|
Model.HJGL_BO_Batch batch = db.HJGL_BO_Batch.FirstOrDefault(e => e.BatchId == batchId);
|
|||
|
|
|||
|
db.HJGL_BO_Batch.DeleteOnSubmit(batch);
|
|||
|
db.SubmitChanges();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|