20240308 会议管理
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 参会人
|
||||
/// </summary>
|
||||
public class MeetingItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据会议Id获取参会人信息
|
||||
/// </summary>
|
||||
/// <param name="meetingId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Driver_MeetingItem> GetMeetingItemByMeetingId(string meetingId)
|
||||
{
|
||||
return (from x in Funs.DB.Driver_MeetingItem where x.MeetingId == meetingId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据会议Id和参会人Id获取参会人信息
|
||||
/// </summary>
|
||||
/// <param name="meetingId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Driver_MeetingItem GetMeetingItemByMeetingIdAndUserId(string meetingId,string userId)
|
||||
{
|
||||
return (from x in Funs.DB.Driver_MeetingItem where x.MeetingId == meetingId && x.UserId == userId select x).FirstOrDefault();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加参会人信息
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
public static void AddMeetingItem(Model.Driver_MeetingItem item)
|
||||
{
|
||||
Model.Driver_MeetingItem newItem = new Model.Driver_MeetingItem
|
||||
{
|
||||
MeetingItemId = item.MeetingItemId,
|
||||
MeetingId = item.MeetingId,
|
||||
UserId = item.UserId,
|
||||
IsMeeting = item.IsMeeting,
|
||||
Feedback = item.Feedback
|
||||
};
|
||||
Funs.DB.Driver_MeetingItem.InsertOnSubmit(newItem);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改参会人信息
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
public static void UpdateMeetingItem(Model.Driver_MeetingItem item)
|
||||
{
|
||||
Model.Driver_MeetingItem newItem = Funs.DB.Driver_MeetingItem.FirstOrDefault(e => e.MeetingItemId == item.MeetingItemId);
|
||||
if (newItem != null)
|
||||
{
|
||||
newItem.IsMeeting = item.IsMeeting;
|
||||
newItem.Feedback = item.Feedback;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据会议Id删除参会人信息
|
||||
/// </summary>
|
||||
/// <param name="meetingId"></param>
|
||||
public static void DeleteMeetingItemByMeetingId(string meetingId)
|
||||
{
|
||||
var item = (from x in Funs.DB.Driver_MeetingItem where x.MeetingId == meetingId select x).ToList();
|
||||
if (item != null)
|
||||
{
|
||||
Funs.DB.Driver_MeetingItem.DeleteAllOnSubmit(item);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 会议管理
|
||||
/// </summary>
|
||||
public static class MeetingService
|
||||
public static class MeetingService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取会议信息
|
||||
@@ -40,6 +36,10 @@ namespace BLL
|
||||
newMeeting.MeetingType = meeting.MeetingType;
|
||||
newMeeting.AttachUrl = meeting.AttachUrl;
|
||||
newMeeting.Remark = meeting.Remark;
|
||||
newMeeting.MeetingCode = meeting.MeetingCode;
|
||||
newMeeting.CompileMan = meeting.CompileMan;
|
||||
newMeeting.CompileDate = meeting.CompileDate;
|
||||
newMeeting.States = meeting.States;
|
||||
|
||||
Funs.DB.Driver_Meeting.InsertOnSubmit(newMeeting);
|
||||
Funs.DB.SubmitChanges();
|
||||
@@ -65,6 +65,8 @@ namespace BLL
|
||||
//newMeeting.MeetingType = meeting.MeetingType;
|
||||
newMeeting.AttachUrl = meeting.AttachUrl;
|
||||
newMeeting.Remark = meeting.Remark;
|
||||
newMeeting.MeetingCode = meeting.MeetingCode;
|
||||
newMeeting.States = meeting.States;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
@@ -79,10 +81,9 @@ namespace BLL
|
||||
Model.Driver_Meeting meeting = Funs.DB.Driver_Meeting.FirstOrDefault(e => e.MeetingId == meetingId);
|
||||
if (meeting != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(meeting.AttachUrl))
|
||||
{
|
||||
BLL.UploadAttachmentService.DeleteFile(Funs.RootPath, meeting.AttachUrl);//删除附件
|
||||
}
|
||||
CommonService.DeleteAttachFileById(meetingId + "#1");//删除会议纪要附件
|
||||
CommonService.DeleteAttachFileById(meetingId + "#2");//删除签到表附件
|
||||
CommonService.DeleteFlowOperateByID(meetingId);//删除流程表
|
||||
Funs.DB.Driver_Meeting.DeleteOnSubmit(meeting);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user