20251216 工程联络单
This commit is contained in:
@@ -247,6 +247,7 @@
|
||||
<Compile Include="HJGL\WeldingManage\WeldRecordInService.cs" />
|
||||
<Compile Include="JGZL\AcceptanceCertificateService.cs" />
|
||||
<Compile Include="JGZL\CommencementReportService.cs" />
|
||||
<Compile Include="JGZL\ContactService.cs" />
|
||||
<Compile Include="JGZL\HandoverCertificateService.cs" />
|
||||
<Compile Include="JsonHelper.cs" />
|
||||
<Compile Include="libFace.cs" />
|
||||
|
||||
@@ -1769,6 +1769,11 @@ namespace BLL
|
||||
/// 工程交工验收证书
|
||||
/// </summary>
|
||||
public const string JGZL_AcceptanceCertificateMenuId = "13172551-E58A-4F87-A090-3B8476FAA517";
|
||||
|
||||
/// <summary>
|
||||
/// 工程联络单
|
||||
/// </summary>
|
||||
public const string JGZL_ContactMenuId = "05725865-4CC9-43A0-A525-F2730019F61C";
|
||||
#endregion
|
||||
|
||||
#region 报表对应ID
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 工程联络单
|
||||
/// </summary>
|
||||
public class ContactService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取工程联络单
|
||||
/// </summary>
|
||||
/// <param name="contactId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.JGZL_Contact GetContactById(string contactId)
|
||||
{
|
||||
return Funs.DB.JGZL_Contact.FirstOrDefault(e => e.ContactId == contactId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加工程联络单
|
||||
/// </summary>
|
||||
/// <param name="contact"></param>
|
||||
public static void AddContact(Model.JGZL_Contact contact)
|
||||
{
|
||||
SGGLDB db = Funs.DB;
|
||||
Model.JGZL_Contact newContact = new Model.JGZL_Contact();
|
||||
newContact.ContactId = contact.ContactId;
|
||||
newContact.ProjectId = contact.ProjectId;
|
||||
newContact.ContractNumber = contact.ContractNumber;
|
||||
newContact.DeliveryUnit = contact.DeliveryUnit;
|
||||
newContact.SubjectMatter = contact.SubjectMatter;
|
||||
newContact.Contents = contact.Contents;
|
||||
newContact.Handler = contact.Handler;
|
||||
newContact.HandDate = contact.HandDate;
|
||||
newContact.Reviewer = contact.Reviewer;
|
||||
newContact.ReviewDate = contact.ReviewDate;
|
||||
newContact.HandlingOpinion = contact.HandlingOpinion;
|
||||
newContact.OpinionHandler = contact.OpinionHandler;
|
||||
newContact.OpinionHandDate = contact.OpinionHandDate;
|
||||
newContact.OpinionsReviewer = contact.OpinionsReviewer;
|
||||
newContact.OpinionsDate = contact.OpinionsDate;
|
||||
newContact.CompileMan = contact.CompileMan;
|
||||
newContact.CompileDate = contact.CompileDate;
|
||||
db.JGZL_Contact.InsertOnSubmit(newContact);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改工程联络单
|
||||
/// </summary>
|
||||
/// <param name="contact"></param>
|
||||
public static void UpdateContact(Model.JGZL_Contact contact)
|
||||
{
|
||||
SGGLDB db = Funs.DB;
|
||||
Model.JGZL_Contact newContact = db.JGZL_Contact.FirstOrDefault(e => e.ContactId == contact.ContactId);
|
||||
if (newContact != null)
|
||||
{
|
||||
newContact.ContractNumber = contact.ContractNumber;
|
||||
newContact.DeliveryUnit = contact.DeliveryUnit;
|
||||
newContact.SubjectMatter = contact.SubjectMatter;
|
||||
newContact.Contents = contact.Contents;
|
||||
newContact.Handler = contact.Handler;
|
||||
newContact.HandDate = contact.HandDate;
|
||||
newContact.Reviewer = contact.Reviewer;
|
||||
newContact.ReviewDate = contact.ReviewDate;
|
||||
newContact.HandlingOpinion = contact.HandlingOpinion;
|
||||
newContact.OpinionHandler = contact.OpinionHandler;
|
||||
newContact.OpinionHandDate = contact.OpinionHandDate;
|
||||
newContact.OpinionsReviewer = contact.OpinionsReviewer;
|
||||
newContact.OpinionsDate = contact.OpinionsDate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除工程联络单
|
||||
/// </summary>
|
||||
/// <param name="contactId"></param>
|
||||
public static void DeleteContactById(string contactId)
|
||||
{
|
||||
SGGLDB db = Funs.DB;
|
||||
var contact = db.JGZL_Contact.FirstOrDefault(e => e.ContactId == contactId);
|
||||
if (contact != null)
|
||||
{
|
||||
db.JGZL_Contact.DeleteOnSubmit(contact);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user