86 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			86 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			C#
		
	
	
	
using System;
 | 
						|
using System.Collections.Generic;
 | 
						|
using System.Linq;
 | 
						|
using System.Text;
 | 
						|
using System.Threading.Tasks;
 | 
						|
 | 
						|
namespace BLL
 | 
						|
{
 | 
						|
    /// <summary>
 | 
						|
    /// 施工技术交底管理
 | 
						|
    /// </summary>
 | 
						|
    public class ConTechnologyDisclosureService
 | 
						|
    {
 | 
						|
        /// <summary>
 | 
						|
        /// 根据主键获取施工技术交底管理
 | 
						|
        /// </summary>
 | 
						|
        /// <param name="conTechnologyDisclosureId"></param>
 | 
						|
        /// <returns></returns>
 | 
						|
        public static Model.Comprehensive_ConTechnologyDisclosure GetConTechnologyDisclosureById(string conTechnologyDisclosureId)
 | 
						|
        {
 | 
						|
            return Funs.DB.Comprehensive_ConTechnologyDisclosure.FirstOrDefault(e => e.ConTechnologyDisclosureId == conTechnologyDisclosureId);
 | 
						|
        }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// 添加施工技术交底管理
 | 
						|
        /// </summary>
 | 
						|
        /// <param name="newCon"></param>
 | 
						|
        public static void AddConTechnologyDisclosure(Model.Comprehensive_ConTechnologyDisclosure con)
 | 
						|
        {
 | 
						|
            Model.Comprehensive_ConTechnologyDisclosure newCon = new Model.Comprehensive_ConTechnologyDisclosure
 | 
						|
            {
 | 
						|
                ConTechnologyDisclosureId = con.ConTechnologyDisclosureId,
 | 
						|
                ProjectId = con.ProjectId,
 | 
						|
                CNProfessionalId = con.CNProfessionalId,
 | 
						|
                DisclosureCode = con.DisclosureCode,
 | 
						|
                DisclosureName = con.DisclosureName,
 | 
						|
                UnitId = con.UnitId,
 | 
						|
                DisclosureMan = con.DisclosureMan,
 | 
						|
                DisclosureDate = con.DisclosureDate,
 | 
						|
                UnitWorkId = con.UnitWorkId,
 | 
						|
                AttendMan = con.AttendMan,
 | 
						|
                CompileMan = con.CompileMan,
 | 
						|
                CompileDate = con.CompileDate,
 | 
						|
                RemarkCode = con.RemarkCode
 | 
						|
            };
 | 
						|
            Funs.DB.Comprehensive_ConTechnologyDisclosure.InsertOnSubmit(newCon);
 | 
						|
            Funs.DB.SubmitChanges();
 | 
						|
        }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// 修改施工技术交底管理
 | 
						|
        /// </summary>
 | 
						|
        /// <param name="con"></param>
 | 
						|
        public static void UpdateConTechnologyDisclosure(Model.Comprehensive_ConTechnologyDisclosure con)
 | 
						|
        {
 | 
						|
            Model.Comprehensive_ConTechnologyDisclosure newCon = Funs.DB.Comprehensive_ConTechnologyDisclosure.FirstOrDefault(e => e.ConTechnologyDisclosureId == con.ConTechnologyDisclosureId);
 | 
						|
            if (newCon != null)
 | 
						|
            {
 | 
						|
                newCon.CNProfessionalId = con.CNProfessionalId;
 | 
						|
                newCon.DisclosureCode = con.DisclosureCode;
 | 
						|
                newCon.DisclosureName = con.DisclosureName;
 | 
						|
                newCon.UnitId = con.UnitId;
 | 
						|
                newCon.DisclosureMan = con.DisclosureMan;
 | 
						|
                newCon.DisclosureDate = con.DisclosureDate;
 | 
						|
                newCon.UnitWorkId = con.UnitWorkId;
 | 
						|
                newCon.AttendMan = con.AttendMan;
 | 
						|
                Funs.DB.SubmitChanges();
 | 
						|
            }
 | 
						|
        }
 | 
						|
 | 
						|
        /// <summary>
 | 
						|
        /// 根据Id删除施工技术交底管理
 | 
						|
        /// </summary>
 | 
						|
        /// <param name="conTechnologyDisclosureId"></param>
 | 
						|
        public static void DeleteConTechnologyDisclosureById(string conTechnologyDisclosureId)
 | 
						|
        {
 | 
						|
            Model.Comprehensive_ConTechnologyDisclosure newCon = Funs.DB.Comprehensive_ConTechnologyDisclosure.FirstOrDefault(e => e.ConTechnologyDisclosureId == conTechnologyDisclosureId);
 | 
						|
            if (newCon != null)
 | 
						|
            {
 | 
						|
                Funs.DB.Comprehensive_ConTechnologyDisclosure.DeleteOnSubmit(newCon);
 | 
						|
                Funs.DB.SubmitChanges();
 | 
						|
            }
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |