2024-04-07 10:44:22 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace BLL
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 资料收发文登记记录
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class DataReceivingDocService
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 根据主键获取资料收发文登记记录
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="dataReceivingDocId"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static Model.Comprehensive_DataReceivingDoc GetDataReceivingDocById(string dataReceivingDocId)
|
|
|
|
|
{
|
|
|
|
|
return Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(e => e.DataReceivingDocId == dataReceivingDocId);
|
2024-04-28 17:40:20 +08:00
|
|
|
|
}
|
2024-04-16 15:22:49 +08:00
|
|
|
|
|
2024-04-07 10:44:22 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// 添加资料收发文登记记录
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="newDoc"></param>
|
|
|
|
|
public static void AddDataReceivingDoc(Model.Comprehensive_DataReceivingDoc doc)
|
|
|
|
|
{
|
|
|
|
|
Model.Comprehensive_DataReceivingDoc newDoc = new Model.Comprehensive_DataReceivingDoc
|
|
|
|
|
{
|
|
|
|
|
DataReceivingDocId = doc.DataReceivingDocId,
|
|
|
|
|
ProjectId = doc.ProjectId,
|
|
|
|
|
FileCode = doc.FileCode,
|
|
|
|
|
FileName = doc.FileName,
|
|
|
|
|
ReceiveDate = doc.ReceiveDate,
|
|
|
|
|
FileType = doc.FileType,
|
|
|
|
|
CNProfessionalId = doc.CNProfessionalId,
|
|
|
|
|
SendUnit = doc.SendUnit,
|
|
|
|
|
SendMan = doc.SendMan,
|
|
|
|
|
Copies = doc.Copies,
|
|
|
|
|
DocumentHandler = doc.DocumentHandler,
|
|
|
|
|
SendDate = doc.SendDate,
|
|
|
|
|
ReceiveUnit = doc.ReceiveUnit,
|
|
|
|
|
ReceiveMan = doc.ReceiveMan,
|
|
|
|
|
IsReply = doc.IsReply,
|
|
|
|
|
ReturnWuhuangDate = doc.ReturnWuhuangDate,
|
|
|
|
|
RetrunWuhuangCopies = doc.RetrunWuhuangCopies,
|
|
|
|
|
IssueToUnit = doc.IssueToUnit,
|
|
|
|
|
IssueCopies = doc.IssueCopies,
|
|
|
|
|
IssueUnitReceiver = doc.IssueUnitReceiver,
|
|
|
|
|
IsOnFile = doc.IsOnFile,
|
|
|
|
|
CompileMan = doc.CompileMan,
|
|
|
|
|
CompileDate = doc.CompileDate,
|
|
|
|
|
Status = doc.Status,
|
|
|
|
|
AuditMan = doc.AuditMan,
|
2024-04-22 11:19:05 +08:00
|
|
|
|
RemarkCode = doc.RemarkCode
|
2024-04-07 10:44:22 +08:00
|
|
|
|
};
|
|
|
|
|
Funs.DB.Comprehensive_DataReceivingDoc.InsertOnSubmit(newDoc);
|
|
|
|
|
Funs.DB.SubmitChanges();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 修改资料收发文登记记录
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="doc"></param>
|
|
|
|
|
public static void UpdateDataReceivingDoc(Model.Comprehensive_DataReceivingDoc doc)
|
|
|
|
|
{
|
|
|
|
|
Model.Comprehensive_DataReceivingDoc newDoc = Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(e => e.DataReceivingDocId == doc.DataReceivingDocId);
|
|
|
|
|
if (newDoc != null)
|
|
|
|
|
{
|
|
|
|
|
newDoc.FileCode = doc.FileCode;
|
|
|
|
|
newDoc.FileName = doc.FileName;
|
|
|
|
|
newDoc.ReceiveDate = doc.ReceiveDate;
|
|
|
|
|
newDoc.FileType = doc.FileType;
|
|
|
|
|
newDoc.CNProfessionalId = doc.CNProfessionalId;
|
|
|
|
|
newDoc.SendUnit = doc.SendUnit;
|
|
|
|
|
newDoc.SendMan = doc.SendMan;
|
|
|
|
|
newDoc.Copies = doc.Copies;
|
|
|
|
|
newDoc.DocumentHandler = doc.DocumentHandler;
|
|
|
|
|
newDoc.SendDate = doc.SendDate;
|
|
|
|
|
newDoc.ReceiveUnit = doc.ReceiveUnit;
|
|
|
|
|
newDoc.ReceiveMan = doc.ReceiveMan;
|
|
|
|
|
newDoc.IsReply = doc.IsReply;
|
|
|
|
|
newDoc.ReturnWuhuangDate = doc.ReturnWuhuangDate;
|
|
|
|
|
newDoc.RetrunWuhuangCopies = doc.RetrunWuhuangCopies;
|
|
|
|
|
newDoc.IssueToUnit = doc.IssueToUnit;
|
|
|
|
|
newDoc.IssueCopies = doc.IssueCopies;
|
|
|
|
|
newDoc.IssueUnitReceiver = doc.IssueUnitReceiver;
|
|
|
|
|
newDoc.IsOnFile = doc.IsOnFile;
|
|
|
|
|
newDoc.CompileMan = doc.CompileMan;
|
|
|
|
|
newDoc.CompileDate = doc.CompileDate;
|
|
|
|
|
newDoc.Status = doc.Status;
|
|
|
|
|
newDoc.AuditMan = doc.AuditMan;
|
2024-04-28 17:40:20 +08:00
|
|
|
|
newDoc.RemarkCode = doc.RemarkCode;
|
2024-04-07 10:44:22 +08:00
|
|
|
|
Funs.DB.SubmitChanges();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 根据主键删除资料收发文登记记录
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="docId"></param>
|
|
|
|
|
public static void DeleteDataReceivingDocById(string docId)
|
|
|
|
|
{
|
|
|
|
|
Model.Comprehensive_DataReceivingDoc newDoc = Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(e => e.DataReceivingDocId == docId);
|
|
|
|
|
if (newDoc != null)
|
|
|
|
|
{
|
|
|
|
|
Funs.DB.Comprehensive_DataReceivingDoc.DeleteOnSubmit(newDoc);
|
|
|
|
|
Funs.DB.SubmitChanges();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|