62 lines
2.4 KiB
C#
62 lines
2.4 KiB
C#
using Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BLL
|
|
{
|
|
/// <summary>
|
|
/// 督查检查整改明细表
|
|
/// </summary>
|
|
public static class DCGLCheckRectifyItemService
|
|
{
|
|
/// <summary>
|
|
/// 根据主键获取督查检查整改明细信息
|
|
/// </summary>
|
|
/// <param name="noticeItemId"></param>
|
|
/// <returns></returns>
|
|
public static Model.DCGL_Check_CheckRectifyItem GetCheckRectifyItemByTable5ItemId(string noticeItemId)
|
|
{
|
|
return Funs.DB.DCGL_Check_CheckRectifyItem.FirstOrDefault(e => e.NoticeItemId == noticeItemId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据督查检查整改id获取所有相关明细信息
|
|
/// </summary>
|
|
/// <param name="CheckRectifyId"></param>
|
|
/// <returns></returns>
|
|
public static List<Model.DCGL_Check_CheckRectifyItem> GetCheckRectifyItemByCheckRectifyId(string checkRectifyId)
|
|
{
|
|
return (from x in Funs.DB.DCGL_Check_CheckRectifyItem where x.CheckRectifyId == checkRectifyId select x).ToList();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据主键获取督查检查整改明细信息
|
|
/// </summary>
|
|
/// <param name="checkRectifyItemId"></param>
|
|
/// <returns></returns>
|
|
public static Model.DCGL_Check_CheckRectifyItem GetCheckRectifyItemByCheckRectifyItemId(string checkRectifyItemId)
|
|
{
|
|
return Funs.DB.DCGL_Check_CheckRectifyItem.FirstOrDefault(e => e.CheckRectifyItemId == checkRectifyItemId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加督查检查整改明细信息
|
|
/// </summary>
|
|
/// <param name="CheckRectifyItem"></param>
|
|
public static void UpdateCheckRectifyItem(Model.DCGL_Check_CheckRectifyItem CheckRectifyItem)
|
|
{
|
|
var newCheckRectifyItem = Funs.DB.DCGL_Check_CheckRectifyItem.FirstOrDefault(x => x.CheckRectifyItemId == CheckRectifyItem.CheckRectifyItemId);
|
|
if (newCheckRectifyItem != null)
|
|
{
|
|
newCheckRectifyItem.OrderEndPerson = CheckRectifyItem.OrderEndPerson;
|
|
newCheckRectifyItem.RealEndDate = CheckRectifyItem.RealEndDate;
|
|
newCheckRectifyItem.Verification = CheckRectifyItem.Verification;
|
|
Funs.DB.SubmitChanges();
|
|
}
|
|
}
|
|
}
|
|
}
|