81 lines
3.0 KiB
C#
81 lines
3.0 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Collections;
|
|||
|
using System.Web.UI.WebControls;
|
|||
|
|
|||
|
namespace BLL
|
|||
|
{
|
|||
|
public class HJGL_CH_TrustItemService
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// 根据委托明细Id获取委托明细信息
|
|||
|
/// </summary>
|
|||
|
/// <param name="jot_id"></param>
|
|||
|
/// <returns></returns>
|
|||
|
public static Model.HJGL_CH_TrustItem GetTrustItemByID(string trustItemId)
|
|||
|
{
|
|||
|
Model.SGGLDB db = Funs.DB;
|
|||
|
var view = db.HJGL_CH_TrustItem.FirstOrDefault(e => e.CH_TrustItemID == trustItemId);
|
|||
|
return view;
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 修改检测明细信息
|
|||
|
/// </summary>
|
|||
|
/// <param name="trustItem">焊接实体</param>
|
|||
|
public static void UpdateTrustItem(Model.HJGL_CH_TrustItem trustItem)
|
|||
|
{
|
|||
|
Model.SGGLDB db = Funs.DB;
|
|||
|
Model.HJGL_CH_TrustItem modityTrustItem = db.HJGL_CH_TrustItem.FirstOrDefault(e => e.CH_TrustItemID == trustItem.CH_TrustItemID);
|
|||
|
if (modityTrustItem != null)
|
|||
|
{
|
|||
|
modityTrustItem.ShootMan = trustItem.ShootMan;
|
|||
|
modityTrustItem.ShootDate = trustItem.ShootDate;
|
|||
|
modityTrustItem.EquipmentId = trustItem.EquipmentId;
|
|||
|
modityTrustItem.States = trustItem.States;
|
|||
|
modityTrustItem.FeedbackMan = trustItem.FeedbackMan;
|
|||
|
modityTrustItem.FeedbackDate = trustItem.FeedbackDate;
|
|||
|
modityTrustItem.ReportNoticeDate = trustItem.ReportNoticeDate;
|
|||
|
modityTrustItem.Record_Printer = trustItem.Record_Printer;
|
|||
|
modityTrustItem.Record_PrintDate = trustItem.Record_PrintDate;
|
|||
|
modityTrustItem.UnableCheck = trustItem.UnableCheck;
|
|||
|
modityTrustItem.UnableCheckReason = trustItem.UnableCheckReason;
|
|||
|
db.SubmitChanges();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 根据主键删除委托信息
|
|||
|
/// </summary>
|
|||
|
/// <param name="cH_TrustID">委托主键</param>
|
|||
|
public static void DeleteTrustItemByBatchDetailId(string batchDetailId)
|
|||
|
{
|
|||
|
Model.SGGLDB db = Funs.DB;
|
|||
|
var trustItem = db.HJGL_CH_TrustItem.Where(e => e.BatchDetailId == batchDetailId);
|
|||
|
if (trustItem != null)
|
|||
|
{
|
|||
|
db.HJGL_CH_TrustItem.DeleteAllOnSubmit(trustItem);
|
|||
|
db.SubmitChanges();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 根据委托明细主键删除委托明细信息
|
|||
|
/// </summary>
|
|||
|
/// <param name="trustItemID">委托明细主键</param>
|
|||
|
public static void DeleteTrustItemById(string trustItemID)
|
|||
|
{
|
|||
|
Model.SGGLDB db = Funs.DB;
|
|||
|
Model.HJGL_CH_TrustItem trustItem = db.HJGL_CH_TrustItem.FirstOrDefault(e => e.CH_TrustItemID == trustItemID);
|
|||
|
if (trustItem != null)
|
|||
|
{
|
|||
|
db.HJGL_CH_TrustItem.DeleteOnSubmit(trustItem);
|
|||
|
db.SubmitChanges();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|