提交代码
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class TestRunPerformanceMonthReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取开车人员月绩效报告
|
||||
/// </summary>
|
||||
/// <param name="TestRunPerformanceMonthReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.ZHGL_TestRunPerformanceMonthReport GetTestRunPerformanceMonthReportById(string TestRunPerformanceMonthReportId)
|
||||
{
|
||||
return Funs.DB.ZHGL_TestRunPerformanceMonthReport.FirstOrDefault(e => e.TestRunPerformanceMonthReportId == TestRunPerformanceMonthReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加开车人员月绩效报告
|
||||
/// </summary>
|
||||
/// <param name="TestRunPerformanceMonthReport"></param>
|
||||
public static void AddTestRunPerformanceMonthReport(Model.ZHGL_TestRunPerformanceMonthReport TestRunPerformanceMonthReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.ZHGL_TestRunPerformanceMonthReport newTestRunPerformanceMonthReport = new Model.ZHGL_TestRunPerformanceMonthReport
|
||||
{
|
||||
TestRunPerformanceMonthReportId = TestRunPerformanceMonthReport.TestRunPerformanceMonthReportId,
|
||||
Year = TestRunPerformanceMonthReport.Year,
|
||||
UserId = TestRunPerformanceMonthReport.UserId,
|
||||
CompileMan = TestRunPerformanceMonthReport.CompileMan,
|
||||
CompileDate = TestRunPerformanceMonthReport.CompileDate
|
||||
};
|
||||
db.ZHGL_TestRunPerformanceMonthReport.InsertOnSubmit(newTestRunPerformanceMonthReport);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改开车人员月绩效报告
|
||||
/// </summary>
|
||||
/// <param name="TestRunPerformanceMonthReport"></param>
|
||||
public static void UpdateTestRunPerformanceMonthReport(Model.ZHGL_TestRunPerformanceMonthReport TestRunPerformanceMonthReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.ZHGL_TestRunPerformanceMonthReport newTestRunPerformanceMonthReport = db.ZHGL_TestRunPerformanceMonthReport.FirstOrDefault(e => e.TestRunPerformanceMonthReportId == TestRunPerformanceMonthReport.TestRunPerformanceMonthReportId);
|
||||
if (newTestRunPerformanceMonthReport != null)
|
||||
{
|
||||
newTestRunPerformanceMonthReport.Year = TestRunPerformanceMonthReport.Year;
|
||||
newTestRunPerformanceMonthReport.UserId = TestRunPerformanceMonthReport.UserId;
|
||||
newTestRunPerformanceMonthReport.CompileMan = TestRunPerformanceMonthReport.CompileMan;
|
||||
newTestRunPerformanceMonthReport.CompileDate = TestRunPerformanceMonthReport.CompileDate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除开车人员月绩效报告
|
||||
/// </summary>
|
||||
/// <param name="TestRunPerformanceMonthReportId"></param>
|
||||
public static void DeleteTestRunPerformanceMonthReportById(string TestRunPerformanceMonthReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.ZHGL_TestRunPerformanceMonthReport TestRunPerformanceMonthReport = db.ZHGL_TestRunPerformanceMonthReport.FirstOrDefault(e => e.TestRunPerformanceMonthReportId == TestRunPerformanceMonthReportId);
|
||||
if (TestRunPerformanceMonthReport != null)
|
||||
{
|
||||
db.ZHGL_TestRunPerformanceMonthReport.DeleteOnSubmit(TestRunPerformanceMonthReport);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user