74 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			74 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			C#
		
	
	
	
| using System.Collections.Generic;
 | |
| using System.Linq;
 | |
| 
 | |
| namespace BLL
 | |
| {
 | |
|     public class Person_MeetingService
 | |
|     {
 | |
|         public static Model.SGGLDB db = Funs.DB;
 | |
| 
 | |
|         /// <summary>
 | |
|         /// 获取实体集合
 | |
|         /// </summary>
 | |
|         /// <returns></returns>
 | |
|         public static Model.Person_Meeting GetPerson_MeetingById(string meetingId)
 | |
|         {
 | |
|             return Funs.DB.Person_Meeting.FirstOrDefault(x => x.MeetingId == meetingId);
 | |
|         }
 | |
|         /// <summary>
 | |
|         /// 添加
 | |
|         /// </summary>
 | |
|         /// <param name="?"></param>
 | |
|         public static void AddPerson_Meeting(Model.Person_Meeting Person_Meeting)
 | |
|         {
 | |
|             Model.SGGLDB db = Funs.DB;
 | |
|             Model.Person_Meeting newPerson_Meeting = new Model.Person_Meeting
 | |
|             {
 | |
|                 MeetingId = Person_Meeting.MeetingId,
 | |
|                 CompileManId = Person_Meeting.CompileManId,
 | |
|                 MeetingDate = Person_Meeting.MeetingDate,
 | |
|                 MeetingTitle = Person_Meeting.MeetingTitle,
 | |
|                 AttendeeManIds = Person_Meeting.AttendeeManIds,
 | |
|                 ConferenceLink = Person_Meeting.ConferenceLink,
 | |
|                 Remark = Person_Meeting.Remark,
 | |
|             };
 | |
| 
 | |
|             db.Person_Meeting.InsertOnSubmit(newPerson_Meeting);
 | |
|             db.SubmitChanges();
 | |
|         }
 | |
| 
 | |
|         /// <summary>
 | |
|         /// 修改
 | |
|         /// </summary>
 | |
|         /// <param name="teamGroup"></param>
 | |
|         public static void UpdatePerson_Meeting(Model.Person_Meeting Person_Meeting)
 | |
|         {
 | |
|             Model.SGGLDB db = Funs.DB;
 | |
|             var newPerson_Meeting = db.Person_Meeting.FirstOrDefault(e => e.MeetingId == Person_Meeting.MeetingId);
 | |
|             if (newPerson_Meeting != null)
 | |
|             {                
 | |
|                 newPerson_Meeting.MeetingDate = Person_Meeting.MeetingDate;
 | |
|                 newPerson_Meeting.MeetingTitle = Person_Meeting.MeetingTitle;
 | |
|                 newPerson_Meeting.AttendeeManIds = Person_Meeting.AttendeeManIds;
 | |
|                 newPerson_Meeting.ConferenceLink = Person_Meeting.ConferenceLink;
 | |
|                 newPerson_Meeting.Remark = Person_Meeting.Remark;
 | |
|                 db.SubmitChanges();
 | |
|             }
 | |
|         }
 | |
| 
 | |
|         /// <summary>
 | |
|         /// 根据主键删除信息
 | |
|         /// </summary>
 | |
|         /// <param name="MeetingId"></param>
 | |
|         public static void DeletePerson_MeetingById(string MeetingId)
 | |
|         {
 | |
|             Model.SGGLDB db = Funs.DB;
 | |
|             Model.Person_Meeting Person_Meeting = db.Person_Meeting.FirstOrDefault(e => e.MeetingId == MeetingId);
 | |
|             {
 | |
|                 db.Person_Meeting.DeleteOnSubmit(Person_Meeting);
 | |
|                 db.SubmitChanges();
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| }
 |