提交代码
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class DCGLCheckRectifyService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据整改ID获取督查检查信息
|
||||
/// </summary>
|
||||
/// <param name="CheckRectifyName"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.DCGL_Check_CheckRectify GetCheckRectifyByCheckRectifyId(string checkRectifyId)
|
||||
{
|
||||
return Funs.DB.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == checkRectifyId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加督查检查整改
|
||||
/// </summary>
|
||||
/// <param name="checkRectify"></param>
|
||||
public static void AddCheckRectify(Model.DCGL_Check_CheckRectify checkRectify)
|
||||
{
|
||||
Model.DCGL_Check_CheckRectify newCheckRectify = new Model.DCGL_Check_CheckRectify
|
||||
{
|
||||
CheckRectifyId = checkRectify.CheckRectifyId,
|
||||
CheckRectifyCode = checkRectify.CheckRectifyCode,
|
||||
ProjectId = checkRectify.ProjectId,
|
||||
UnitId = checkRectify.UnitId,
|
||||
CheckDate = checkRectify.CheckDate,
|
||||
IssueMan = checkRectify.IssueMan,
|
||||
IssueDate = checkRectify.IssueDate,
|
||||
HandleState = checkRectify.HandleState
|
||||
};
|
||||
Funs.DB.DCGL_Check_CheckRectify.InsertOnSubmit(newCheckRectify);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改督查检查整改
|
||||
/// </summary>
|
||||
/// <param name="checkRectify"></param>
|
||||
public static void UpdateCheckRectify(Model.DCGL_Check_CheckRectify checkRectify)
|
||||
{
|
||||
Model.DCGL_Check_CheckRectify newCheckRectify = Funs.DB.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == checkRectify.CheckRectifyId);
|
||||
if (newCheckRectify != null)
|
||||
{
|
||||
newCheckRectify.CheckRectifyCode = checkRectify.CheckRectifyCode;
|
||||
newCheckRectify.ProjectId = checkRectify.ProjectId;
|
||||
newCheckRectify.UnitId = checkRectify.UnitId;
|
||||
newCheckRectify.CheckDate = checkRectify.CheckDate;
|
||||
newCheckRectify.IssueMan = checkRectify.IssueMan;
|
||||
newCheckRectify.IssueDate = checkRectify.IssueDate;
|
||||
|
||||
newCheckRectify.HandleState = checkRectify.HandleState;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user