Merge branch 'master' of http://47.104.102.122:3000/lpf/sggl_cd
This commit is contained in:
@@ -52,38 +52,38 @@ namespace BLL
|
||||
|
||||
db.Training_TestRecord.InsertOnSubmit(newTestRecord);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
public static void AddTestRecordForApi(Model.Training_TestRecord testRecord)
|
||||
}
|
||||
public static void AddTestRecordForApi(Model.Training_TestRecord testRecord)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Training_TestRecord newTestRecord = new Model.Training_TestRecord
|
||||
{
|
||||
TestRecordId = testRecord.TestRecordId,
|
||||
ProjectId = testRecord.ProjectId,
|
||||
TestPlanId = testRecord.TestPlanId,
|
||||
TestManId = testRecord.TestManId,
|
||||
TestType = testRecord.TestType,
|
||||
};
|
||||
Model.Training_TestRecord newTestRecord = new Model.Training_TestRecord
|
||||
{
|
||||
TestRecordId = testRecord.TestRecordId,
|
||||
ProjectId = testRecord.ProjectId,
|
||||
TestPlanId = testRecord.TestPlanId,
|
||||
TestManId = testRecord.TestManId,
|
||||
TestType = testRecord.TestType,
|
||||
};
|
||||
|
||||
if (string.IsNullOrEmpty(newTestRecord.TestType))
|
||||
{
|
||||
var getTrainTypeName = (from x in db.Training_TestPlan
|
||||
join y in db.Training_Plan on x.PlanId equals y.PlanId
|
||||
join z in db.Base_TrainType on y.TrainTypeId equals z.TrainTypeId
|
||||
where x.TestPlanId == testRecord.TestPlanId
|
||||
select z).FirstOrDefault();
|
||||
if (string.IsNullOrEmpty(newTestRecord.TestType))
|
||||
{
|
||||
var getTrainTypeName = (from x in db.Training_TestPlan
|
||||
join y in db.Training_Plan on x.PlanId equals y.PlanId
|
||||
join z in db.Base_TrainType on y.TrainTypeId equals z.TrainTypeId
|
||||
where x.TestPlanId == testRecord.TestPlanId
|
||||
select z).FirstOrDefault();
|
||||
|
||||
if (getTrainTypeName != null)
|
||||
{
|
||||
testRecord.TestType = getTrainTypeName.TrainTypeName;
|
||||
}
|
||||
}
|
||||
if (getTrainTypeName != null)
|
||||
{
|
||||
testRecord.TestType = getTrainTypeName.TrainTypeName;
|
||||
}
|
||||
}
|
||||
|
||||
db.Training_TestRecord.InsertOnSubmit(newTestRecord);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
db.Training_TestRecord.InsertOnSubmit(newTestRecord);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改考试记录信息
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user