78 lines
3.4 KiB
C#
78 lines
3.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BLL
|
|
{
|
|
public class Person_TestRunMonthSummaryService
|
|
{
|
|
/// <summary>
|
|
/// 获取人员信息
|
|
/// </summary>
|
|
/// <param name="TestRunMonthSummaryId">人员Id</param>
|
|
/// <returns>人员信息</returns>
|
|
public static Model.Person_TestRunMonthSummary GetPersonTestRunMonthSummaryById(string TestRunMonthSummaryId)
|
|
{
|
|
return Funs.DB.Person_TestRunMonthSummary.FirstOrDefault(e => e.TestRunMonthSummaryId == TestRunMonthSummaryId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 增加人员总结信息
|
|
/// </summary>
|
|
/// <param name="user">人员实体</param>
|
|
public static void AddPersonTestRunMonthSummary(Model.Person_TestRunMonthSummary TestRunMonthSummary)
|
|
{
|
|
Model.SGGLDB db = Funs.DB;
|
|
Model.Person_TestRunMonthSummary newTestRunMonthSummary = new Model.Person_TestRunMonthSummary
|
|
{
|
|
TestRunMonthSummaryId = TestRunMonthSummary.TestRunMonthSummaryId,
|
|
ProjectId = TestRunMonthSummary.ProjectId,
|
|
UserId = TestRunMonthSummary.UserId,
|
|
ProcessName = TestRunMonthSummary.ProcessName,
|
|
RaiseDate = TestRunMonthSummary.RaiseDate,
|
|
ProblemDescription = TestRunMonthSummary.ProblemDescription,
|
|
HandleMethod = TestRunMonthSummary.HandleMethod,
|
|
ExperienceOrSuggestion = TestRunMonthSummary.ExperienceOrSuggestion,
|
|
};
|
|
db.Person_TestRunMonthSummary.InsertOnSubmit(newTestRunMonthSummary);
|
|
db.SubmitChanges();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 修改人员总结信息
|
|
/// </summary>
|
|
/// <param name="user">实体</param>
|
|
public static void UpdatePersonTestRunMonthSummary(Model.Person_TestRunMonthSummary TestRunMonthSummary)
|
|
{
|
|
Model.SGGLDB db = Funs.DB;
|
|
Model.Person_TestRunMonthSummary newTestRunMonthSummary = db.Person_TestRunMonthSummary.FirstOrDefault(e => e.TestRunMonthSummaryId == TestRunMonthSummary.TestRunMonthSummaryId);
|
|
if (newTestRunMonthSummary != null)
|
|
{
|
|
newTestRunMonthSummary.ProcessName = TestRunMonthSummary.ProcessName;
|
|
newTestRunMonthSummary.RaiseDate = TestRunMonthSummary.RaiseDate;
|
|
newTestRunMonthSummary.ProblemDescription = TestRunMonthSummary.ProblemDescription;
|
|
newTestRunMonthSummary.HandleMethod = TestRunMonthSummary.HandleMethod;
|
|
newTestRunMonthSummary.ExperienceOrSuggestion = TestRunMonthSummary.ExperienceOrSuggestion;
|
|
db.SubmitChanges();
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据人员Id删除一个人员信息
|
|
/// </summary>
|
|
/// <param name="Person_TestRunMonthSummaryId"></param>
|
|
public static void DeletePersonTestRunMonthSummary(string TestRunMonthSummaryId)
|
|
{
|
|
Model.SGGLDB db = Funs.DB;
|
|
Model.Person_TestRunMonthSummary user = db.Person_TestRunMonthSummary.FirstOrDefault(e => e.TestRunMonthSummaryId == TestRunMonthSummaryId);
|
|
if (user != null)
|
|
{
|
|
db.Person_TestRunMonthSummary.DeleteOnSubmit(user);
|
|
db.SubmitChanges();
|
|
}
|
|
}
|
|
}
|
|
}
|