数据库变更CNPC_XJYJ

This commit is contained in:
2025-08-04 18:04:41 +08:00
parent bafbf97359
commit 79a7f35e22
679 changed files with 5590 additions and 3465 deletions
@@ -9,7 +9,7 @@ namespace BLL
/// </summary>
public static class ServerTestPlanService
{
public static Model.SGGLDB db = Funs.DB;
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据主键获取知识竞赛计划
@@ -27,7 +27,7 @@ namespace BLL
/// <param name="TestPlan"></param>
public static void AddTestPlan(Model.Test_TestPlan TestPlan)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Test_TestPlan newTestPlan = new Model.Test_TestPlan
{
TestPlanId = TestPlan.TestPlanId,
@@ -57,7 +57,7 @@ namespace BLL
/// <param name="TestPlan"></param>
public static void UpdateTestPlan(Model.Test_TestPlan TestPlan)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Test_TestPlan newTestPlan = db.Test_TestPlan.FirstOrDefault(e => e.TestPlanId == TestPlan.TestPlanId);
if (newTestPlan != null)
{
@@ -86,7 +86,7 @@ namespace BLL
/// <param name="TestPlanId"></param>
public static void DeleteTestPlanById(string TestPlanId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Test_TestPlan TestPlan = db.Test_TestPlan.FirstOrDefault(e => e.TestPlanId == TestPlanId);
if (TestPlan != null)
{
@@ -107,7 +107,7 @@ namespace BLL
/// <returns></returns>
public static string EndTestPlan(string testPlanId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
string info = string.Empty;
var getTestPlans = from x in db.Test_TestPlan
where x.States == Const.State_2 && x.TestEndTime.Value.AddMinutes(x.Duration.Value) < DateTime.Now
@@ -10,7 +10,7 @@ namespace BLL
/// </summary>
public static class ServerTestPlanTrainingService
{
public static Model.SGGLDB db = Funs.DB;
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据主键获取知识竞赛计划
@@ -28,7 +28,7 @@ namespace BLL
/// <param name="TestPlanTraining"></param>
public static void AddTestPlanTraining(Model.Test_TestPlanTraining TestPlanTraining)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Test_TestPlanTraining newTestPlanTraining = new Model.Test_TestPlanTraining
{
TestPlanTrainingId = TestPlanTraining.TestPlanTrainingId,
@@ -49,7 +49,7 @@ namespace BLL
/// <param name="TestPlanTraining"></param>
public static void UpdateTestPlanTraining(Model.Test_TestPlanTraining TestPlanTraining)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Test_TestPlanTraining newTestPlanTraining = db.Test_TestPlanTraining.FirstOrDefault(e => e.TestPlanTrainingId == TestPlanTraining.TestPlanTrainingId);
if (newTestPlanTraining != null)
{
@@ -68,7 +68,7 @@ namespace BLL
/// <param name="TestPlanTrainingId"></param>
public static void DeleteTestPlanTrainingById(string TestPlanTrainingId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Test_TestPlanTraining TestPlanTraining = db.Test_TestPlanTraining.FirstOrDefault(e => e.TestPlanTrainingId == TestPlanTrainingId);
if (TestPlanTraining != null)
{
@@ -83,7 +83,7 @@ namespace BLL
/// <param name="TestPlanTrainingId"></param>
public static void DeleteTestPlanTrainingByTestPlanId(string TestPlanId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var TestPlanTraining = from x in db.Test_TestPlanTraining where x.TestPlanId == TestPlanId select x;
if (TestPlanTraining.Count() > 0)
{
@@ -10,7 +10,7 @@ namespace BLL
/// </summary>
public static class ServerTestRecordService
{
public static Model.SGGLDB db = Funs.DB;
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据主键获取考试记录
@@ -28,7 +28,7 @@ namespace BLL
/// <param name="Training"></param>
public static void AddTestRecord(Model.Test_TestRecord testRecord)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Test_TestRecord newTestRecord = new Model.Test_TestRecord
{
TestRecordId = testRecord.TestRecordId,
@@ -47,7 +47,7 @@ namespace BLL
/// <param name="Training"></param>
public static void UpdateTestRecord(Model.Test_TestRecord testRecord)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Test_TestRecord newTestRecord = db.Test_TestRecord.FirstOrDefault(e => e.TestRecordId == testRecord.TestRecordId);
if (newTestRecord != null)
{
@@ -79,7 +79,7 @@ namespace BLL
/// <param name="planId"></param>
public static void DeleteTestRecordByTestRecordId(string testRecordId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
{
var testRecord = db.Test_TestRecord.FirstOrDefault(e => e.TestRecordId == testRecordId);
if (testRecord != null)
@@ -103,7 +103,7 @@ namespace BLL
public static int UpdateTestEndTimeNull(string testRecordId)
{
int icount = 0;
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
{
var testRecord = from x in db.Test_TestRecord
where !x.TestEndTime.HasValue && x.TestStartTime.HasValue