数据库变更CNPC_XJYJ
This commit is contained in:
@@ -18,7 +18,7 @@ namespace BLL
|
||||
/// <returns>考试人员</returns>
|
||||
public static List<Model.TestRecordItem> getTestRecordListByTestPlanId(string testPlanId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_TestRecord
|
||||
where x.TestPlanId == testPlanId
|
||||
@@ -49,7 +49,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.TestRecordItem getTestRecordByTestRecordId(string testRecordId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Training_TestRecord
|
||||
join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
|
||||
@@ -78,7 +78,7 @@ namespace BLL
|
||||
|
||||
public static string CreateTestRecordItem(Model.Training_CompanyTrainingItem getCompanyTraining, string testRecordId, Model.SitePerson_Person person, Model.Sys_User user)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var trainingIds = getCompanyTraining.TestTrainingIds.Split(',');
|
||||
var testTrainings = db.Training_TestTraining.Where(x => trainingIds.Contains(x.TrainingId));
|
||||
@@ -235,7 +235,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static string CreateTestRecordItem(Model.Training_TestPlan getTestPlan, string testRecordId, Model.SitePerson_Person person)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getTestRecord = db.Training_TestRecord.FirstOrDefault(x => x.TestRecordId == testRecordId);
|
||||
if (getTestRecord != null && !getTestRecord.TestStartTime.HasValue)
|
||||
@@ -367,7 +367,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static string CreateFixTestRecordItem(Model.Training_TestPlan getTestPlan, string testRecordId, Model.SitePerson_Person person)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getTestRecord = db.Training_TestRecord.FirstOrDefault(x => x.TestRecordId == testRecordId);
|
||||
if (getTestRecord != null && !getTestRecord.TestStartTime.HasValue)
|
||||
@@ -500,7 +500,7 @@ namespace BLL
|
||||
/// <returns>考试记录列表</returns>
|
||||
public static List<Model.TestRecordItem> getTrainingTestRecordListByProjectIdPersonId(string projectId, string personId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_TestRecord
|
||||
join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
|
||||
@@ -536,7 +536,7 @@ namespace BLL
|
||||
/// <returns>考试记录列表</returns>
|
||||
public static List<Model.TestRecordItem> getTrainingTestRecordListByProjectId(string projectId, string unitId, string workPostId, string strPass, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_TestRecord
|
||||
join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
|
||||
@@ -599,7 +599,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static string getUnitName(string testManId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string name = string.Empty;
|
||||
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == testManId);
|
||||
@@ -620,7 +620,7 @@ namespace BLL
|
||||
/// <returns>考试人员</returns>
|
||||
public static List<Model.TestRecordItemItem> geTestRecordItemListByTestRecordId(string testRecordId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_TestRecordItem
|
||||
where x.TestRecordId == testRecordId
|
||||
@@ -658,7 +658,7 @@ namespace BLL
|
||||
/// <returns>考试人员</returns>
|
||||
public static Model.TestRecordItemItem geTestRecordItemByTestRecordItemId(string testRecordItemId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Training_TestRecordItem
|
||||
where x.TestRecordItemId == testRecordItemId
|
||||
@@ -696,7 +696,7 @@ namespace BLL
|
||||
/// <param name="answerItems"></param>
|
||||
public static void getTestRecordItemAnswerBySelectedItem(Model.Training_TestRecordItem getTItemT, string selectedItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getTItem = db.Training_TestRecordItem.FirstOrDefault(x => x.TestRecordItemId == getTItemT.TestRecordItemId);
|
||||
if (getTItem != null)
|
||||
@@ -752,7 +752,7 @@ namespace BLL
|
||||
public static decimal getSubmitTestRecord(Model.Training_TestRecord testRecord)
|
||||
{
|
||||
decimal getCode = 0;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getTestRecord = db.Training_TestRecord.FirstOrDefault(e => e.TestRecordId == testRecord.TestRecordId);
|
||||
/////试卷
|
||||
@@ -780,7 +780,7 @@ namespace BLL
|
||||
/// <param name="testPlanId"></param>
|
||||
public static void updateAll(string testPlanId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
//// 获取考试计划
|
||||
var getTestPlan = db.Training_TestPlan.FirstOrDefault(x => x.TestPlanId == testPlanId);
|
||||
|
||||
Reference in New Issue
Block a user