0813
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 党支部基本情况明细
|
||||
/// </summary>
|
||||
public class BasicInformationDetailService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取党支部基本情况明细
|
||||
/// </summary>
|
||||
/// <param name="basicInformationDetailId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Party_BasicInformationDetail GetBasicInformationDetailById(string basicInformationDetailId)
|
||||
{
|
||||
return Funs.DB.Party_BasicInformationDetail.FirstOrDefault(e => e.BasicInformationDetailId == basicInformationDetailId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据外键获取党支部基本情况明细集合
|
||||
/// </summary>
|
||||
/// <param name="basicInformationId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Party_BasicInformationDetail> GetBasicInformationDetailsById(string basicInformationId)
|
||||
{
|
||||
return (from x in Funs.DB.Party_BasicInformationDetail where x.BasicInformationId == basicInformationId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加党支部基本情况明细
|
||||
/// </summary>
|
||||
/// <param name="basicInformationDetail"></param>
|
||||
public static void AddBasicInformationDetail(Model.Party_BasicInformationDetail basicInformationDetail)
|
||||
{
|
||||
Model.Party_BasicInformationDetail newBasicInformationDetail = new Model.Party_BasicInformationDetail
|
||||
{
|
||||
BasicInformationDetailId = basicInformationDetail.BasicInformationDetailId,
|
||||
BasicInformationId = basicInformationDetail.BasicInformationId,
|
||||
SortIndex = basicInformationDetail.SortIndex,
|
||||
Name = basicInformationDetail.Name,
|
||||
BirthDate = basicInformationDetail.BirthDate,
|
||||
JoinPartyDate = basicInformationDetail.JoinPartyDate,
|
||||
PartyPost = basicInformationDetail.PartyPost,
|
||||
AdministrationPost = basicInformationDetail.AdministrationPost,
|
||||
PartyPostJoinDate = basicInformationDetail.PartyPostJoinDate
|
||||
};
|
||||
Funs.DB.Party_BasicInformationDetail.InsertOnSubmit(newBasicInformationDetail);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改党支部基本情况明细
|
||||
/// </summary>
|
||||
/// <param name="basicInformationDetail"></param>
|
||||
public static void UpdateBasicInformationDetail(Model.Party_BasicInformationDetail basicInformationDetail)
|
||||
{
|
||||
Model.Party_BasicInformationDetail newBasicInformationDetail = Funs.DB.Party_BasicInformationDetail.FirstOrDefault(e => e.BasicInformationDetailId == basicInformationDetail.BasicInformationDetailId);
|
||||
if (newBasicInformationDetail != null)
|
||||
{
|
||||
newBasicInformationDetail.Name = basicInformationDetail.Name;
|
||||
newBasicInformationDetail.BirthDate = basicInformationDetail.BirthDate;
|
||||
newBasicInformationDetail.JoinPartyDate = basicInformationDetail.JoinPartyDate;
|
||||
newBasicInformationDetail.PartyPost = basicInformationDetail.PartyPost;
|
||||
newBasicInformationDetail.AdministrationPost = basicInformationDetail.AdministrationPost;
|
||||
newBasicInformationDetail.PartyPostJoinDate = basicInformationDetail.PartyPostJoinDate;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除党支部基本情况明细
|
||||
/// </summary>
|
||||
/// <param name="basicInformationDetailId"></param>
|
||||
public static void DeleteBasicInformationDetailById(string basicInformationDetailId)
|
||||
{
|
||||
Model.Party_BasicInformationDetail basicInformationDetail = Funs.DB.Party_BasicInformationDetail.FirstOrDefault(e => e.BasicInformationDetailId == basicInformationDetailId);
|
||||
if (basicInformationDetail != null)
|
||||
{
|
||||
Funs.DB.Party_BasicInformationDetail.DeleteOnSubmit(basicInformationDetail);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除党支部基本情况明细
|
||||
/// </summary>
|
||||
/// <param name="basicInformationId"></param>
|
||||
public static void DeleteBasicInformationDetailsById(string basicInformationId)
|
||||
{
|
||||
var basicInformationDetails = from x in Funs.DB.Party_BasicInformationDetail where x.BasicInformationId == basicInformationId select x;
|
||||
if (basicInformationDetails.Count() > 0)
|
||||
{
|
||||
Funs.DB.Party_BasicInformationDetail.DeleteAllOnSubmit(basicInformationDetails);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 党支部基本情况
|
||||
/// </summary>
|
||||
public class BasicInformationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取党支部基本情况
|
||||
/// </summary>
|
||||
/// <param name="basicInformationId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Party_BasicInformation GetBasicInformationById(string basicInformationId)
|
||||
{
|
||||
return Funs.DB.Party_BasicInformation.FirstOrDefault(e => e.BasicInformationId == basicInformationId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据年份获取党支部基本情况
|
||||
/// </summary>
|
||||
/// <param name="year"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Party_BasicInformation GetBasicInformationByYear(string year)
|
||||
{
|
||||
return Funs.DB.Party_BasicInformation.FirstOrDefault(e => e.Year == Convert.ToInt32(year));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取最近的党支部基本情况
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static Model.Party_BasicInformation GetOldBasicInformation()
|
||||
{
|
||||
return Funs.DB.Party_BasicInformation.OrderByDescending(x => x.Year).FirstOrDefault();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加党支部基本情况
|
||||
/// </summary>
|
||||
/// <param name="basicInformation"></param>
|
||||
public static void AddBasicInformation(Model.Party_BasicInformation basicInformation)
|
||||
{
|
||||
Model.Party_BasicInformation newBasicInformation = new Model.Party_BasicInformation
|
||||
{
|
||||
BasicInformationId = basicInformation.BasicInformationId,
|
||||
Year = basicInformation.Year,
|
||||
Name = basicInformation.Name,
|
||||
StartDate = basicInformation.StartDate,
|
||||
Component = basicInformation.Component,
|
||||
PartyerNum = basicInformation.PartyerNum,
|
||||
PersonNum = basicInformation.PersonNum,
|
||||
PartyGroupNum = basicInformation.PartyGroupNum,
|
||||
Commendation = basicInformation.Commendation,
|
||||
Punishment = basicInformation.Punishment
|
||||
};
|
||||
Funs.DB.Party_BasicInformation.InsertOnSubmit(newBasicInformation);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改党支部基本情况
|
||||
/// </summary>
|
||||
/// <param name="basicInformation"></param>
|
||||
public static void UpdateBasicInformation(Model.Party_BasicInformation basicInformation)
|
||||
{
|
||||
Model.Party_BasicInformation newBasicInformation = Funs.DB.Party_BasicInformation.FirstOrDefault(e => e.BasicInformationId == basicInformation.BasicInformationId);
|
||||
if (newBasicInformation != null)
|
||||
{
|
||||
newBasicInformation.Name = basicInformation.Name;
|
||||
newBasicInformation.StartDate = basicInformation.StartDate;
|
||||
newBasicInformation.Component = basicInformation.Component;
|
||||
newBasicInformation.PartyerNum = basicInformation.PartyerNum;
|
||||
newBasicInformation.PersonNum = basicInformation.PersonNum;
|
||||
newBasicInformation.PartyGroupNum = basicInformation.PartyGroupNum;
|
||||
newBasicInformation.Commendation = basicInformation.Commendation;
|
||||
newBasicInformation.Punishment = basicInformation.Punishment;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除党支部基本情况
|
||||
/// </summary>
|
||||
/// <param name="basicInformationId"></param>
|
||||
public static void DeleteBasicInformationById(string basicInformationId)
|
||||
{
|
||||
Model.Party_BasicInformation basicInformation = Funs.DB.Party_BasicInformation.FirstOrDefault(e => e.BasicInformationId == basicInformationId);
|
||||
if (basicInformation != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(basicInformationId);
|
||||
Funs.DB.Party_BasicInformation.DeleteOnSubmit(basicInformation);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 民主评议党员
|
||||
/// </summary>
|
||||
public class CommentPartyerService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取民主评议党员
|
||||
/// </summary>
|
||||
/// <param name="commentPartyerId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Party_CommentPartyer GetCommentPartyerById(string commentPartyerId)
|
||||
{
|
||||
return Funs.DB.Party_CommentPartyer.FirstOrDefault(e => e.CommentPartyerId == commentPartyerId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加民主评议党员
|
||||
/// </summary>
|
||||
/// <param name="commentPartyer"></param>
|
||||
public static void AddCommentPartyer(Model.Party_CommentPartyer commentPartyer)
|
||||
{
|
||||
Model.Party_CommentPartyer newCommentPartyer = new Model.Party_CommentPartyer
|
||||
{
|
||||
CommentPartyerId = commentPartyer.CommentPartyerId,
|
||||
Year = commentPartyer.Year,
|
||||
ProjectId = commentPartyer.ProjectId,
|
||||
Partyers = commentPartyer.Partyers,
|
||||
Host=commentPartyer.Host,
|
||||
CompileMan = commentPartyer.CompileMan,
|
||||
CompileDate = commentPartyer.CompileDate
|
||||
};
|
||||
Funs.DB.Party_CommentPartyer.InsertOnSubmit(newCommentPartyer);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改民主评议党员
|
||||
/// </summary>
|
||||
/// <param name="commentPartyer"></param>
|
||||
public static void UpdateCommentPartyer(Model.Party_CommentPartyer commentPartyer)
|
||||
{
|
||||
Model.Party_CommentPartyer newCommentPartyer = Funs.DB.Party_CommentPartyer.FirstOrDefault(e => e.CommentPartyerId == commentPartyer.CommentPartyerId);
|
||||
if (newCommentPartyer != null)
|
||||
{
|
||||
newCommentPartyer.ProjectId = commentPartyer.ProjectId;
|
||||
newCommentPartyer.Partyers = commentPartyer.Partyers;
|
||||
newCommentPartyer.Host = commentPartyer.Host;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除民主评议党员
|
||||
/// </summary>
|
||||
/// <param name="commentPartyerId"></param>
|
||||
public static void DeleteCommentPartyerById(string commentPartyerId)
|
||||
{
|
||||
Model.Party_CommentPartyer commentPartyer = Funs.DB.Party_CommentPartyer.FirstOrDefault(e => e.CommentPartyerId == commentPartyerId);
|
||||
if (commentPartyer != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(commentPartyerId);
|
||||
Funs.DB.Party_CommentPartyer.DeleteOnSubmit(commentPartyer);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 为群众办实事
|
||||
/// </summary>
|
||||
public class DoingThingsForMassesService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取为群众办实事
|
||||
/// </summary>
|
||||
/// <param name="doingThingsForMassesId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Party_DoingThingsForMasses GetDoingThingsForMassesById(string doingThingsForMassesId)
|
||||
{
|
||||
return Funs.DB.Party_DoingThingsForMasses.FirstOrDefault(e => e.DoingThingsForMassesId == doingThingsForMassesId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加为群众办实事
|
||||
/// </summary>
|
||||
/// <param name="doingThingsForMasses"></param>
|
||||
public static void AddDoingThingsForMasses(Model.Party_DoingThingsForMasses doingThingsForMasses)
|
||||
{
|
||||
Model.Party_DoingThingsForMasses newDoingThingsForMasses = new Model.Party_DoingThingsForMasses
|
||||
{
|
||||
DoingThingsForMassesId = doingThingsForMasses.DoingThingsForMassesId,
|
||||
Year = doingThingsForMasses.Year,
|
||||
Name = doingThingsForMasses.Name,
|
||||
DifficultyDescription = doingThingsForMasses.DifficultyDescription,
|
||||
DifficultyType = doingThingsForMasses.DifficultyType,
|
||||
HelpProgram = doingThingsForMasses.HelpProgram,
|
||||
HelpTime = doingThingsForMasses.HelpTime,
|
||||
FollowUp = doingThingsForMasses.FollowUp,
|
||||
CompileMan = doingThingsForMasses.CompileMan,
|
||||
CompileDate = doingThingsForMasses.CompileDate
|
||||
};
|
||||
Funs.DB.Party_DoingThingsForMasses.InsertOnSubmit(newDoingThingsForMasses);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改为群众办实事
|
||||
/// </summary>
|
||||
/// <param name="doingThingsForMasses"></param>
|
||||
public static void UpdateDoingThingsForMasses(Model.Party_DoingThingsForMasses doingThingsForMasses)
|
||||
{
|
||||
Model.Party_DoingThingsForMasses newDoingThingsForMasses = Funs.DB.Party_DoingThingsForMasses.FirstOrDefault(e => e.DoingThingsForMassesId == doingThingsForMasses.DoingThingsForMassesId);
|
||||
if (newDoingThingsForMasses != null)
|
||||
{
|
||||
newDoingThingsForMasses.Name = doingThingsForMasses.Name;
|
||||
newDoingThingsForMasses.DifficultyDescription = doingThingsForMasses.DifficultyDescription;
|
||||
newDoingThingsForMasses.DifficultyType = doingThingsForMasses.DifficultyType;
|
||||
newDoingThingsForMasses.HelpProgram = doingThingsForMasses.HelpProgram;
|
||||
newDoingThingsForMasses.HelpTime = doingThingsForMasses.HelpTime;
|
||||
newDoingThingsForMasses.FollowUp = doingThingsForMasses.FollowUp;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除为群众办实事
|
||||
/// </summary>
|
||||
/// <param name="doingThingsForMassesId"></param>
|
||||
public static void DeleteDoingThingsForMassesById(string doingThingsForMassesId)
|
||||
{
|
||||
Model.Party_DoingThingsForMasses doingThingsForMasses = Funs.DB.Party_DoingThingsForMasses.FirstOrDefault(e => e.DoingThingsForMassesId == doingThingsForMassesId);
|
||||
if (doingThingsForMasses != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(doingThingsForMassesId);
|
||||
Funs.DB.Party_DoingThingsForMasses.DeleteOnSubmit(doingThingsForMasses);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 集中学习
|
||||
/// </summary>
|
||||
public class FocusLearnService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取集中学习
|
||||
/// </summary>
|
||||
/// <param name="focusLearnId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Party_FocusLearn GetFocusLearnById(string focusLearnId)
|
||||
{
|
||||
return Funs.DB.Party_FocusLearn.FirstOrDefault(e => e.FocusLearnId == focusLearnId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加集中学习
|
||||
/// </summary>
|
||||
/// <param name="focusLearn"></param>
|
||||
public static void AddFocusLearn(Model.Party_FocusLearn focusLearn)
|
||||
{
|
||||
Model.Party_FocusLearn newFocusLearn = new Model.Party_FocusLearn
|
||||
{
|
||||
FocusLearnId = focusLearn.FocusLearnId,
|
||||
Year = focusLearn.Year,
|
||||
Quarter = focusLearn.Quarter,
|
||||
CompileMan = focusLearn.CompileMan,
|
||||
CompileDate = focusLearn.CompileDate
|
||||
};
|
||||
Funs.DB.Party_FocusLearn.InsertOnSubmit(newFocusLearn);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改集中学习
|
||||
/// </summary>
|
||||
/// <param name="focusLearn"></param>
|
||||
public static void UpdateFocusLearn(Model.Party_FocusLearn focusLearn)
|
||||
{
|
||||
Model.Party_FocusLearn newFocusLearn = Funs.DB.Party_FocusLearn.FirstOrDefault(e => e.FocusLearnId == focusLearn.FocusLearnId);
|
||||
if (newFocusLearn != null)
|
||||
{
|
||||
newFocusLearn.Quarter = focusLearn.Quarter;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除集中学习
|
||||
/// </summary>
|
||||
/// <param name="focusLearnId"></param>
|
||||
public static void DeleteFocusLearnById(string focusLearnId)
|
||||
{
|
||||
Model.Party_FocusLearn focusLearn = Funs.DB.Party_FocusLearn.FirstOrDefault(e => e.FocusLearnId == focusLearnId);
|
||||
if (focusLearn != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(focusLearnId);
|
||||
CommonService.DeleteAttachFileById(focusLearnId + "2");
|
||||
CommonService.DeleteAttachFileById(focusLearnId + "3");
|
||||
Funs.DB.Party_FocusLearn.DeleteOnSubmit(focusLearn);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,8 +47,6 @@ namespace BLL
|
||||
Model.Party_LastWorkSummary newLastWorkSummary = Funs.DB.Party_LastWorkSummary.FirstOrDefault(e => e.LastWorkSummaryId == lastWorkSummary.LastWorkSummaryId);
|
||||
if (newLastWorkSummary != null)
|
||||
{
|
||||
newLastWorkSummary.CompileMan = lastWorkSummary.CompileMan;
|
||||
newLastWorkSummary.CompileDate = lastWorkSummary.CompileDate;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 新闻宣传工作
|
||||
/// </summary>
|
||||
public class NewsPropagandaWorkService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取新闻宣传工作
|
||||
/// </summary>
|
||||
/// <param name="newsPropagandaWorkId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Party_NewsPropagandaWork GetNewsPropagandaWorkById(string newsPropagandaWorkId)
|
||||
{
|
||||
return Funs.DB.Party_NewsPropagandaWork.FirstOrDefault(e => e.NewsPropagandaWorkId == newsPropagandaWorkId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加新闻宣传工作
|
||||
/// </summary>
|
||||
/// <param name="newsPropagandaWork"></param>
|
||||
public static void AddNewsPropagandaWork(Model.Party_NewsPropagandaWork newsPropagandaWork)
|
||||
{
|
||||
Model.Party_NewsPropagandaWork newNewsPropagandaWork = new Model.Party_NewsPropagandaWork
|
||||
{
|
||||
NewsPropagandaWorkId = newsPropagandaWork.NewsPropagandaWorkId,
|
||||
Year = newsPropagandaWork.Year,
|
||||
NewsDate = newsPropagandaWork.NewsDate,
|
||||
Author = newsPropagandaWork.Author,
|
||||
CompileMan = newsPropagandaWork.CompileMan,
|
||||
CompileDate = newsPropagandaWork.CompileDate
|
||||
};
|
||||
Funs.DB.Party_NewsPropagandaWork.InsertOnSubmit(newNewsPropagandaWork);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改新闻宣传工作
|
||||
/// </summary>
|
||||
/// <param name="newsPropagandaWork"></param>
|
||||
public static void UpdateNewsPropagandaWork(Model.Party_NewsPropagandaWork newsPropagandaWork)
|
||||
{
|
||||
Model.Party_NewsPropagandaWork newNewsPropagandaWork = Funs.DB.Party_NewsPropagandaWork.FirstOrDefault(e => e.NewsPropagandaWorkId == newsPropagandaWork.NewsPropagandaWorkId);
|
||||
if (newNewsPropagandaWork != null)
|
||||
{
|
||||
newNewsPropagandaWork.NewsDate = newsPropagandaWork.NewsDate;
|
||||
newNewsPropagandaWork.Author = newsPropagandaWork.Author;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除新闻宣传工作
|
||||
/// </summary>
|
||||
/// <param name="newsPropagandaWorkId"></param>
|
||||
public static void DeleteNewsPropagandaWorkById(string newsPropagandaWorkId)
|
||||
{
|
||||
Model.Party_NewsPropagandaWork newsPropagandaWork = Funs.DB.Party_NewsPropagandaWork.FirstOrDefault(e => e.NewsPropagandaWorkId == newsPropagandaWorkId);
|
||||
if (newsPropagandaWork != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(newsPropagandaWorkId);
|
||||
Funs.DB.Party_NewsPropagandaWork.DeleteOnSubmit(newsPropagandaWork);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,8 +55,6 @@ namespace BLL
|
||||
newOrganizingLife.Theme = organizingLife.Theme;
|
||||
newOrganizingLife.OrganizingLifeDate = organizingLife.OrganizingLifeDate;
|
||||
newOrganizingLife.Partyers = organizingLife.Partyers;
|
||||
newOrganizingLife.CompileMan = organizingLife.CompileMan;
|
||||
newOrganizingLife.CompileDate = organizingLife.CompileDate;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,8 +49,6 @@ namespace BLL
|
||||
if (newPartyCommittee != null)
|
||||
{
|
||||
newPartyCommittee.Month = partyCommittee.Month;
|
||||
newPartyCommittee.CompileMan = partyCommittee.CompileMan;
|
||||
newPartyCommittee.CompileDate = partyCommittee.CompileDate;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,8 +49,6 @@ namespace BLL
|
||||
if (newPartyCongress != null)
|
||||
{
|
||||
newPartyCongress.Quarter = partyCongress.Quarter;
|
||||
newPartyCongress.CompileMan = partyCongress.CompileMan;
|
||||
newPartyCongress.CompileDate = partyCongress.CompileDate;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 党史学习教育
|
||||
/// </summary>
|
||||
public class PartyHistoryStudyService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取党史学习教育
|
||||
/// </summary>
|
||||
/// <param name="partyHistoryStudyId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Party_PartyHistoryStudy GetPartyHistoryStudyById(string partyHistoryStudyId)
|
||||
{
|
||||
return Funs.DB.Party_PartyHistoryStudy.FirstOrDefault(e => e.PartyHistoryStudyId == partyHistoryStudyId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加党史学习教育
|
||||
/// </summary>
|
||||
/// <param name="partyHistoryStudy"></param>
|
||||
public static void AddPartyHistoryStudy(Model.Party_PartyHistoryStudy partyHistoryStudy)
|
||||
{
|
||||
Model.Party_PartyHistoryStudy newPartyHistoryStudy = new Model.Party_PartyHistoryStudy
|
||||
{
|
||||
PartyHistoryStudyId = partyHistoryStudy.PartyHistoryStudyId,
|
||||
Year = partyHistoryStudy.Year,
|
||||
StudyDate = partyHistoryStudy.StudyDate,
|
||||
Speaker = partyHistoryStudy.Speaker,
|
||||
Theme = partyHistoryStudy.Theme,
|
||||
CompileMan = partyHistoryStudy.CompileMan,
|
||||
CompileDate = partyHistoryStudy.CompileDate
|
||||
};
|
||||
Funs.DB.Party_PartyHistoryStudy.InsertOnSubmit(newPartyHistoryStudy);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改党史学习教育
|
||||
/// </summary>
|
||||
/// <param name="partyHistoryStudy"></param>
|
||||
public static void UpdatePartyHistoryStudy(Model.Party_PartyHistoryStudy partyHistoryStudy)
|
||||
{
|
||||
Model.Party_PartyHistoryStudy newPartyHistoryStudy = Funs.DB.Party_PartyHistoryStudy.FirstOrDefault(e => e.PartyHistoryStudyId == partyHistoryStudy.PartyHistoryStudyId);
|
||||
if (newPartyHistoryStudy != null)
|
||||
{
|
||||
newPartyHistoryStudy.StudyDate = partyHistoryStudy.StudyDate;
|
||||
newPartyHistoryStudy.Speaker = partyHistoryStudy.Speaker;
|
||||
newPartyHistoryStudy.Theme = partyHistoryStudy.Theme;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除党史学习教育
|
||||
/// </summary>
|
||||
/// <param name="partyHistoryStudyId"></param>
|
||||
public static void DeletePartyHistoryStudyById(string partyHistoryStudyId)
|
||||
{
|
||||
Model.Party_PartyHistoryStudy partyHistoryStudy = Funs.DB.Party_PartyHistoryStudy.FirstOrDefault(e => e.PartyHistoryStudyId == partyHistoryStudyId);
|
||||
if (partyHistoryStudy != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(partyHistoryStudyId);
|
||||
Funs.DB.Party_PartyHistoryStudy.DeleteOnSubmit(partyHistoryStudy);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,8 +49,6 @@ namespace BLL
|
||||
if (newPartyLecture != null)
|
||||
{
|
||||
newPartyLecture.Quarter = partyLecture.Quarter;
|
||||
newPartyLecture.CompileMan = partyLecture.CompileMan;
|
||||
newPartyLecture.CompileDate = partyLecture.CompileDate;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,8 +49,6 @@ namespace BLL
|
||||
if (newPartyMeeting != null)
|
||||
{
|
||||
newPartyMeeting.Month = partyMeeting.Month;
|
||||
newPartyMeeting.CompileMan = partyMeeting.CompileMan;
|
||||
newPartyMeeting.CompileDate = partyMeeting.CompileDate;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 党组织工作经费使用
|
||||
/// </summary>
|
||||
public class PartyMoneyUseService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取党组织工作经费使用
|
||||
/// </summary>
|
||||
/// <param name="partyMoneyUseId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Party_PartyMoneyUse GetPartyMoneyUseById(string partyMoneyUseId)
|
||||
{
|
||||
return Funs.DB.Party_PartyMoneyUse.FirstOrDefault(e => e.PartyMoneyUseId == partyMoneyUseId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加党组织工作经费使用
|
||||
/// </summary>
|
||||
/// <param name="partyMoneyUse"></param>
|
||||
public static void AddPartyMoneyUse(Model.Party_PartyMoneyUse partyMoneyUse)
|
||||
{
|
||||
Model.Party_PartyMoneyUse newPartyMoneyUse = new Model.Party_PartyMoneyUse
|
||||
{
|
||||
PartyMoneyUseId = partyMoneyUse.PartyMoneyUseId,
|
||||
Year = partyMoneyUse.Year,
|
||||
UseDate = partyMoneyUse.UseDate,
|
||||
Purpose = partyMoneyUse.Purpose,
|
||||
Cost = partyMoneyUse.Cost,
|
||||
Partyers = partyMoneyUse.Partyers,
|
||||
CompileMan = partyMoneyUse.CompileMan,
|
||||
CompileDate = partyMoneyUse.CompileDate
|
||||
};
|
||||
Funs.DB.Party_PartyMoneyUse.InsertOnSubmit(newPartyMoneyUse);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改党组织工作经费使用
|
||||
/// </summary>
|
||||
/// <param name="partyMoneyUse"></param>
|
||||
public static void UpdatePartyMoneyUse(Model.Party_PartyMoneyUse partyMoneyUse)
|
||||
{
|
||||
Model.Party_PartyMoneyUse newPartyMoneyUse = Funs.DB.Party_PartyMoneyUse.FirstOrDefault(e => e.PartyMoneyUseId == partyMoneyUse.PartyMoneyUseId);
|
||||
if (newPartyMoneyUse != null)
|
||||
{
|
||||
newPartyMoneyUse.UseDate = partyMoneyUse.UseDate;
|
||||
newPartyMoneyUse.Purpose = partyMoneyUse.Purpose;
|
||||
newPartyMoneyUse.Cost = partyMoneyUse.Cost;
|
||||
newPartyMoneyUse.Partyers = partyMoneyUse.Partyers;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除党组织工作经费使用
|
||||
/// </summary>
|
||||
/// <param name="partyMoneyUseId"></param>
|
||||
public static void DeletePartyMoneyUseById(string partyMoneyUseId)
|
||||
{
|
||||
Model.Party_PartyMoneyUse partyMoneyUse = Funs.DB.Party_PartyMoneyUse.FirstOrDefault(e => e.PartyMoneyUseId == partyMoneyUseId);
|
||||
if (partyMoneyUse != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(partyMoneyUseId);
|
||||
Funs.DB.Party_PartyMoneyUse.DeleteOnSubmit(partyMoneyUse);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 党员先锋岗、示范岗
|
||||
/// </summary>
|
||||
public class PartyPioneerDemonstrationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取党员先锋岗、示范岗
|
||||
/// </summary>
|
||||
/// <param name="partyPioneerDemonstrationId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Party_PartyPioneerDemonstration GetPartyPioneerDemonstrationById(string partyPioneerDemonstrationId)
|
||||
{
|
||||
return Funs.DB.Party_PartyPioneerDemonstration.FirstOrDefault(e => e.PartyPioneerDemonstrationId == partyPioneerDemonstrationId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加党员先锋岗、示范岗
|
||||
/// </summary>
|
||||
/// <param name="partyPioneerDemonstration"></param>
|
||||
public static void AddPartyPioneerDemonstration(Model.Party_PartyPioneerDemonstration partyPioneerDemonstration)
|
||||
{
|
||||
Model.Party_PartyPioneerDemonstration newPartyPioneerDemonstration = new Model.Party_PartyPioneerDemonstration
|
||||
{
|
||||
PartyPioneerDemonstrationId = partyPioneerDemonstration.PartyPioneerDemonstrationId,
|
||||
Year = partyPioneerDemonstration.Year,
|
||||
PartyerId = partyPioneerDemonstration.PartyerId,
|
||||
Introduce = partyPioneerDemonstration.Introduce,
|
||||
Deeds = partyPioneerDemonstration.Deeds,
|
||||
Summary = partyPioneerDemonstration.Summary,
|
||||
CompileMan = partyPioneerDemonstration.CompileMan,
|
||||
CompileDate = partyPioneerDemonstration.CompileDate
|
||||
};
|
||||
Funs.DB.Party_PartyPioneerDemonstration.InsertOnSubmit(newPartyPioneerDemonstration);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改党员先锋岗、示范岗
|
||||
/// </summary>
|
||||
/// <param name="partyPioneerDemonstration"></param>
|
||||
public static void UpdatePartyPioneerDemonstration(Model.Party_PartyPioneerDemonstration partyPioneerDemonstration)
|
||||
{
|
||||
Model.Party_PartyPioneerDemonstration newPartyPioneerDemonstration = Funs.DB.Party_PartyPioneerDemonstration.FirstOrDefault(e => e.PartyPioneerDemonstrationId == partyPioneerDemonstration.PartyPioneerDemonstrationId);
|
||||
if (newPartyPioneerDemonstration != null)
|
||||
{
|
||||
newPartyPioneerDemonstration.PartyerId = partyPioneerDemonstration.PartyerId;
|
||||
newPartyPioneerDemonstration.Introduce = partyPioneerDemonstration.Introduce;
|
||||
newPartyPioneerDemonstration.Deeds = partyPioneerDemonstration.Deeds;
|
||||
newPartyPioneerDemonstration.Summary = partyPioneerDemonstration.Summary;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除党员先锋岗、示范岗
|
||||
/// </summary>
|
||||
/// <param name="partyPioneerDemonstrationId"></param>
|
||||
public static void DeletePartyPioneerDemonstrationById(string partyPioneerDemonstrationId)
|
||||
{
|
||||
Model.Party_PartyPioneerDemonstration partyPioneerDemonstration = Funs.DB.Party_PartyPioneerDemonstration.FirstOrDefault(e => e.PartyPioneerDemonstrationId == partyPioneerDemonstrationId);
|
||||
if (partyPioneerDemonstration != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(partyPioneerDemonstrationId);
|
||||
Funs.DB.Party_PartyPioneerDemonstration.DeleteOnSubmit(partyPioneerDemonstration);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 党员名册
|
||||
/// </summary>
|
||||
public class PartyerService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取党员名册
|
||||
/// </summary>
|
||||
/// <param name="partyerId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Party_Partyer GetPartyerById(string partyerId)
|
||||
{
|
||||
return Funs.DB.Party_Partyer.FirstOrDefault(e => e.PartyerId == partyerId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加党员名册
|
||||
/// </summary>
|
||||
/// <param name="partyer"></param>
|
||||
public static void AddPartyer(Model.Party_Partyer partyer)
|
||||
{
|
||||
Model.Party_Partyer newPartyer = new Model.Party_Partyer
|
||||
{
|
||||
PartyerId = partyer.PartyerId,
|
||||
Name = partyer.Name,
|
||||
Sex = partyer.Sex,
|
||||
BirthDate = partyer.BirthDate,
|
||||
Education = partyer.Education,
|
||||
Nation = partyer.Nation,
|
||||
JoinPartyDate = partyer.JoinPartyDate,
|
||||
JoinPostDate = partyer.JoinPostDate,
|
||||
Post = partyer.Post,
|
||||
Phone = partyer.Phone,
|
||||
PartyRelationInDate = partyer.PartyRelationInDate,
|
||||
PartyRelationOutDate = partyer.PartyRelationOutDate
|
||||
};
|
||||
Funs.DB.Party_Partyer.InsertOnSubmit(newPartyer);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改党员名册
|
||||
/// </summary>
|
||||
/// <param name="partyer"></param>
|
||||
public static void UpdatePartyer(Model.Party_Partyer partyer)
|
||||
{
|
||||
Model.Party_Partyer newPartyer = Funs.DB.Party_Partyer.FirstOrDefault(e => e.PartyerId == partyer.PartyerId);
|
||||
if (newPartyer != null)
|
||||
{
|
||||
newPartyer.Name = partyer.Name;
|
||||
newPartyer.Sex = partyer.Sex;
|
||||
newPartyer.BirthDate = partyer.BirthDate;
|
||||
newPartyer.Education = partyer.Education;
|
||||
newPartyer.Nation = partyer.Nation;
|
||||
newPartyer.JoinPartyDate = partyer.JoinPartyDate;
|
||||
newPartyer.JoinPostDate = partyer.JoinPostDate;
|
||||
newPartyer.Post = partyer.Post;
|
||||
newPartyer.Phone = partyer.Phone;
|
||||
newPartyer.PartyRelationInDate = partyer.PartyRelationInDate;
|
||||
newPartyer.PartyRelationOutDate = partyer.PartyRelationOutDate;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除党员名册
|
||||
/// </summary>
|
||||
/// <param name="partyerId"></param>
|
||||
public static void DeletePartyerById(string partyerId)
|
||||
{
|
||||
Model.Party_Partyer partyer = Funs.DB.Party_Partyer.FirstOrDefault(e => e.PartyerId == partyerId);
|
||||
if (partyer != null)
|
||||
{
|
||||
Funs.DB.Party_Partyer.DeleteOnSubmit(partyer);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取党员下拉选项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Party_Partyer> GetPartyerList()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.Party_Partyer> list = new List<Model.Party_Partyer>();
|
||||
list = (from x in db.Party_Partyer
|
||||
orderby x.Name
|
||||
select x).ToList();
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 党员下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitPartyerDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "PartyerId";
|
||||
dropName.DataTextField = "Name";
|
||||
dropName.DataSource = GetPartyerList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取党员姓名
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string GetNameByPartyId(string partyId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string name = null;
|
||||
Model.Party_Partyer partyer = db.Party_Partyer.FirstOrDefault(x=>x.PartyerId== partyId);
|
||||
if (partyer != null)
|
||||
{
|
||||
name = partyer.Name;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
#region 根据多党员ID得到党员名称字符串
|
||||
/// <summary>
|
||||
/// 根据多党员ID得到党员名称字符串
|
||||
/// </summary>
|
||||
/// <param name="partyIds"></param>
|
||||
/// <returns></returns>
|
||||
public static string getNamesPartyIds(object partyIds)
|
||||
{
|
||||
string name = string.Empty;
|
||||
if (partyIds != null)
|
||||
{
|
||||
string[] ids = partyIds.ToString().Split(',');
|
||||
foreach (string id in ids)
|
||||
{
|
||||
var q = GetNameByPartyId(id);
|
||||
if (q != null)
|
||||
{
|
||||
name += q + ",";
|
||||
}
|
||||
}
|
||||
if (name != string.Empty)
|
||||
{
|
||||
name = name.Substring(0, name.Length - 1); ;
|
||||
}
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 主题党日活动
|
||||
/// </summary>
|
||||
public class ThemePartyDayService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取主题党日活动
|
||||
/// </summary>
|
||||
/// <param name="themePartyDayId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Party_ThemePartyDay GetThemePartyDayById(string themePartyDayId)
|
||||
{
|
||||
return Funs.DB.Party_ThemePartyDay.FirstOrDefault(e => e.ThemePartyDayId == themePartyDayId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加主题党日活动
|
||||
/// </summary>
|
||||
/// <param name="themePartyDay"></param>
|
||||
public static void AddThemePartyDay(Model.Party_ThemePartyDay themePartyDay)
|
||||
{
|
||||
Model.Party_ThemePartyDay newThemePartyDay = new Model.Party_ThemePartyDay
|
||||
{
|
||||
ThemePartyDayId = themePartyDay.ThemePartyDayId,
|
||||
Year = themePartyDay.Year,
|
||||
ConveneDate = themePartyDay.ConveneDate,
|
||||
Theme = themePartyDay.Theme,
|
||||
CompileMan = themePartyDay.CompileMan,
|
||||
CompileDate = themePartyDay.CompileDate
|
||||
};
|
||||
Funs.DB.Party_ThemePartyDay.InsertOnSubmit(newThemePartyDay);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改主题党日活动
|
||||
/// </summary>
|
||||
/// <param name="themePartyDay"></param>
|
||||
public static void UpdateThemePartyDay(Model.Party_ThemePartyDay themePartyDay)
|
||||
{
|
||||
Model.Party_ThemePartyDay newThemePartyDay = Funs.DB.Party_ThemePartyDay.FirstOrDefault(e => e.ThemePartyDayId == themePartyDay.ThemePartyDayId);
|
||||
if (newThemePartyDay != null)
|
||||
{
|
||||
newThemePartyDay.ConveneDate = themePartyDay.ConveneDate;
|
||||
newThemePartyDay.Theme = themePartyDay.Theme;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除主题党日活动
|
||||
/// </summary>
|
||||
/// <param name="themePartyDayId"></param>
|
||||
public static void DeleteThemePartyDayById(string themePartyDayId)
|
||||
{
|
||||
Model.Party_ThemePartyDay themePartyDay = Funs.DB.Party_ThemePartyDay.FirstOrDefault(e => e.ThemePartyDayId == themePartyDayId);
|
||||
if (themePartyDay != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(themePartyDayId);
|
||||
Funs.DB.Party_ThemePartyDay.DeleteOnSubmit(themePartyDay);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// “两优一先”评选表
|
||||
/// </summary>
|
||||
public class TwoOneGoodSelectionService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取“两优一先”评选表
|
||||
/// </summary>
|
||||
/// <param name="twoOneGoodSelectionId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Party_TwoOneGoodSelection GetTwoOneGoodSelectionById(string twoOneGoodSelectionId)
|
||||
{
|
||||
return Funs.DB.Party_TwoOneGoodSelection.FirstOrDefault(e => e.TwoOneGoodSelectionId == twoOneGoodSelectionId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据类别获取字符串
|
||||
/// </summary>
|
||||
/// <param name="selectionType"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetSelectionType(string selectionType)
|
||||
{
|
||||
string type = string.Empty;
|
||||
if (selectionType == "1")
|
||||
{
|
||||
type = "优秀党员";
|
||||
}
|
||||
else if (selectionType == "2")
|
||||
{
|
||||
type = "优秀党务工作者";
|
||||
}
|
||||
else if (selectionType == "3")
|
||||
{
|
||||
type = "先进基层党支部";
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取当选人/党支部
|
||||
/// </summary>
|
||||
/// <param name="twoOneGoodSelectionId"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetName(string twoOneGoodSelectionId)
|
||||
{
|
||||
string name = string.Empty;
|
||||
Model.Party_TwoOneGoodSelection twoOneGoodSelection = Funs.DB.Party_TwoOneGoodSelection.FirstOrDefault(x=>x.TwoOneGoodSelectionId== twoOneGoodSelectionId);
|
||||
if (twoOneGoodSelection != null)
|
||||
{
|
||||
if (twoOneGoodSelection.SelectionType == "3")
|
||||
{
|
||||
name = twoOneGoodSelection.PartyBranch;
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Party_Partyer partyer = Funs.DB.Party_Partyer.FirstOrDefault(x=>x.PartyerId==twoOneGoodSelection.PartyerId);
|
||||
if (partyer != null)
|
||||
{
|
||||
name = partyer.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加“两优一先”评选表
|
||||
/// </summary>
|
||||
/// <param name="twoOneGoodSelection"></param>
|
||||
public static void AddTwoOneGoodSelection(Model.Party_TwoOneGoodSelection twoOneGoodSelection)
|
||||
{
|
||||
Model.Party_TwoOneGoodSelection newTwoOneGoodSelection = new Model.Party_TwoOneGoodSelection
|
||||
{
|
||||
TwoOneGoodSelectionId = twoOneGoodSelection.TwoOneGoodSelectionId,
|
||||
Year = twoOneGoodSelection.Year,
|
||||
SelectionType = twoOneGoodSelection.SelectionType,
|
||||
PartyerId = twoOneGoodSelection.PartyerId,
|
||||
PartyBranch = twoOneGoodSelection.PartyBranch,
|
||||
CompileMan = twoOneGoodSelection.CompileMan,
|
||||
CompileDate = twoOneGoodSelection.CompileDate
|
||||
};
|
||||
Funs.DB.Party_TwoOneGoodSelection.InsertOnSubmit(newTwoOneGoodSelection);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改“两优一先”评选表
|
||||
/// </summary>
|
||||
/// <param name="twoOneGoodSelection"></param>
|
||||
public static void UpdateTwoOneGoodSelection(Model.Party_TwoOneGoodSelection twoOneGoodSelection)
|
||||
{
|
||||
Model.Party_TwoOneGoodSelection newTwoOneGoodSelection = Funs.DB.Party_TwoOneGoodSelection.FirstOrDefault(e => e.TwoOneGoodSelectionId == twoOneGoodSelection.TwoOneGoodSelectionId);
|
||||
if (newTwoOneGoodSelection != null)
|
||||
{
|
||||
newTwoOneGoodSelection.SelectionType = twoOneGoodSelection.SelectionType;
|
||||
newTwoOneGoodSelection.PartyerId = twoOneGoodSelection.PartyerId;
|
||||
newTwoOneGoodSelection.PartyBranch = twoOneGoodSelection.PartyBranch;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除“两优一先”评选表
|
||||
/// </summary>
|
||||
/// <param name="twoOneGoodSelectionId"></param>
|
||||
public static void DeleteTwoOneGoodSelectionById(string twoOneGoodSelectionId)
|
||||
{
|
||||
Model.Party_TwoOneGoodSelection twoOneGoodSelection = Funs.DB.Party_TwoOneGoodSelection.FirstOrDefault(e => e.TwoOneGoodSelectionId == twoOneGoodSelectionId);
|
||||
if (twoOneGoodSelection != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(twoOneGoodSelectionId);
|
||||
Funs.DB.Party_TwoOneGoodSelection.DeleteOnSubmit(twoOneGoodSelection);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,8 +47,6 @@ namespace BLL
|
||||
Model.Party_WorkPlan newWorkPlan = Funs.DB.Party_WorkPlan.FirstOrDefault(e => e.WorkPlanId == workPlan.WorkPlanId);
|
||||
if (newWorkPlan != null)
|
||||
{
|
||||
newWorkPlan.CompileMan = workPlan.CompileMan;
|
||||
newWorkPlan.CompileDate = workPlan.CompileDate;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user