76 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			76 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 EmployeeConversationRecordService
 | |
|     {
 | |
|         /// <summary>
 | |
|         /// 根据主键获取员工谈话记录
 | |
|         /// </summary>
 | |
|         /// <param name="employeeConversationRecordId"></param>
 | |
|         /// <returns></returns>
 | |
|         public static Model.Party_EmployeeConversationRecord GetEmployeeConversationRecordById(string employeeConversationRecordId)
 | |
|         {
 | |
|             return Funs.DB.Party_EmployeeConversationRecord.FirstOrDefault(e => e.EmployeeConversationRecordId == employeeConversationRecordId);
 | |
|         }
 | |
| 
 | |
|         /// <summary>
 | |
|         /// 添加员工谈话记录
 | |
|         /// </summary>
 | |
|         /// <param name="employeeConversationRecord"></param>
 | |
|         public static void AddEmployeeConversationRecord(Model.Party_EmployeeConversationRecord employeeConversationRecord)
 | |
|         {
 | |
|             Model.Party_EmployeeConversationRecord newEmployeeConversationRecord = new Model.Party_EmployeeConversationRecord
 | |
|             {
 | |
|                 EmployeeConversationRecordId = employeeConversationRecord.EmployeeConversationRecordId,
 | |
|                 Year = employeeConversationRecord.Year,
 | |
|                 Speaker = employeeConversationRecord.Speaker,
 | |
|                 Interviewee = employeeConversationRecord.Interviewee,
 | |
|                 ConversationDate = employeeConversationRecord.ConversationDate,
 | |
|                 CompileMan = employeeConversationRecord.CompileMan,
 | |
|                 CompileDate = employeeConversationRecord.CompileDate
 | |
|             };
 | |
|             Funs.DB.Party_EmployeeConversationRecord.InsertOnSubmit(newEmployeeConversationRecord);
 | |
|             Funs.DB.SubmitChanges();
 | |
|         }
 | |
| 
 | |
|         /// <summary>
 | |
|         /// 修改员工谈话记录
 | |
|         /// </summary>
 | |
|         /// <param name="employeeConversationRecord"></param>
 | |
|         public static void UpdateEmployeeConversationRecord(Model.Party_EmployeeConversationRecord employeeConversationRecord)
 | |
|         {
 | |
|             Model.Party_EmployeeConversationRecord newEmployeeConversationRecord = Funs.DB.Party_EmployeeConversationRecord.FirstOrDefault(e => e.EmployeeConversationRecordId == employeeConversationRecord.EmployeeConversationRecordId);
 | |
|             if (newEmployeeConversationRecord != null)
 | |
|             {
 | |
|                 newEmployeeConversationRecord.Speaker = employeeConversationRecord.Speaker;
 | |
|                 newEmployeeConversationRecord.Interviewee = employeeConversationRecord.Interviewee;
 | |
|                 newEmployeeConversationRecord.ConversationDate = employeeConversationRecord.ConversationDate;
 | |
|                 Funs.DB.SubmitChanges();
 | |
|             }
 | |
|         }
 | |
| 
 | |
|         /// <summary>
 | |
|         /// 根据主键删除员工谈话记录
 | |
|         /// </summary>
 | |
|         /// <param name="employeeConversationRecordId"></param>
 | |
|         public static void DeleteEmployeeConversationRecordById(string employeeConversationRecordId)
 | |
|         {
 | |
|             Model.Party_EmployeeConversationRecord employeeConversationRecord = Funs.DB.Party_EmployeeConversationRecord.FirstOrDefault(e => e.EmployeeConversationRecordId == employeeConversationRecordId);
 | |
|             if (employeeConversationRecord != null)
 | |
|             {
 | |
|                 CommonService.DeleteAttachFileById(employeeConversationRecordId);
 | |
|                 Funs.DB.Party_EmployeeConversationRecord.DeleteOnSubmit(employeeConversationRecord);
 | |
|                 Funs.DB.SubmitChanges();
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| }
 |