0813
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user