提交代码
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class Person_TestRunPerformanceService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取人员信息
|
||||
/// </summary>
|
||||
/// <param name="TestRunPerformanceId">人员Id</param>
|
||||
/// <returns>人员信息</returns>
|
||||
public static Model.Person_TestRunPerformance GetPersonTestRunPerformanceById(string TestRunPerformanceId)
|
||||
{
|
||||
return Funs.DB.Person_TestRunPerformance.FirstOrDefault(e => e.TestRunPerformanceId == TestRunPerformanceId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加人员总结信息
|
||||
/// </summary>
|
||||
/// <param name="user">人员实体</param>
|
||||
public static void AddPersonTestRunPerformance(Model.Person_TestRunPerformance TestRunPerformance)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Person_TestRunPerformance newTestRunPerformance = new Model.Person_TestRunPerformance
|
||||
{
|
||||
TestRunPerformanceId = TestRunPerformance.TestRunPerformanceId,
|
||||
ProjectId = TestRunPerformance.ProjectId,
|
||||
UserId = TestRunPerformance.UserId,
|
||||
Months = TestRunPerformance.Months,
|
||||
JobContent = TestRunPerformance.JobContent,
|
||||
TestRunPerformanceStandardId = TestRunPerformance.TestRunPerformanceStandardId,
|
||||
Days = TestRunPerformance.Days,
|
||||
};
|
||||
db.Person_TestRunPerformance.InsertOnSubmit(newTestRunPerformance);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改人员总结信息
|
||||
/// </summary>
|
||||
/// <param name="user">实体</param>
|
||||
public static void UpdatePersonTestRunPerformance(Model.Person_TestRunPerformance TestRunPerformance)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Person_TestRunPerformance newTestRunPerformance = db.Person_TestRunPerformance.FirstOrDefault(e => e.TestRunPerformanceId == TestRunPerformance.TestRunPerformanceId);
|
||||
if (newTestRunPerformance != null)
|
||||
{
|
||||
newTestRunPerformance.Months = TestRunPerformance.Months;
|
||||
newTestRunPerformance.JobContent = TestRunPerformance.JobContent;
|
||||
newTestRunPerformance.TestRunPerformanceStandardId = TestRunPerformance.TestRunPerformanceStandardId;
|
||||
newTestRunPerformance.Days = TestRunPerformance.Days;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据人员Id删除一个人员信息
|
||||
/// </summary>
|
||||
/// <param name="Person_TestRunPerformanceId"></param>
|
||||
public static void DeletePersonTestRunPerformance(string TestRunPerformanceId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Person_TestRunPerformance user = db.Person_TestRunPerformance.FirstOrDefault(e => e.TestRunPerformanceId == TestRunPerformanceId);
|
||||
if (user != null)
|
||||
{
|
||||
db.Person_TestRunPerformance.DeleteOnSubmit(user);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user