1代码合并
This commit is contained in:
@@ -33,8 +33,6 @@ namespace BLL
|
||||
newCompanyTrainingItem.AttachUrl = companyTrainingItem.AttachUrl;
|
||||
newCompanyTrainingItem.CompileMan = companyTrainingItem.CompileMan;
|
||||
newCompanyTrainingItem.CompileDate = companyTrainingItem.CompileDate;
|
||||
newCompanyTrainingItem.LearningTime = companyTrainingItem.LearningTime;
|
||||
newCompanyTrainingItem.TestTrainingIds = companyTrainingItem.TestTrainingIds;
|
||||
db.Training_CompanyTrainingItem.InsertOnSubmit(newCompanyTrainingItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -53,8 +51,6 @@ namespace BLL
|
||||
newCompanyTrainingItem.AttachUrl = companyTrainingItem.AttachUrl;
|
||||
newCompanyTrainingItem.CompileMan = companyTrainingItem.CompileMan;
|
||||
newCompanyTrainingItem.CompileDate = companyTrainingItem.CompileDate;
|
||||
newCompanyTrainingItem.LearningTime = companyTrainingItem.LearningTime;
|
||||
newCompanyTrainingItem.TestTrainingIds = companyTrainingItem.TestTrainingIds;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,37 +152,5 @@ namespace BLL
|
||||
}
|
||||
return icount;
|
||||
}
|
||||
|
||||
public static void AddTestRecordForApi(Model.Training_TestRecord testRecord)
|
||||
{
|
||||
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,
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
db.Training_TestRecord.InsertOnSubmit(newTestRecord);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,8 +52,7 @@ namespace BLL
|
||||
ResourcesFromType = trainingItem.ResourcesFromType,
|
||||
IsPass = trainingItem.IsPass,
|
||||
UnitId = trainingItem.UnitId,
|
||||
UpState = trainingItem.UpState,
|
||||
LearningTime = trainingItem.LearningTime
|
||||
UpState = trainingItem.UpState
|
||||
};
|
||||
|
||||
db.Training_TrainingItem.InsertOnSubmit(newTrainingItem);
|
||||
@@ -81,7 +80,6 @@ namespace BLL
|
||||
newTrainingItem.ResourcesFrom = trainingItem.ResourcesFrom;
|
||||
newTrainingItem.ResourcesFromType = trainingItem.ResourcesFromType;
|
||||
newTrainingItem.UpState = trainingItem.UpState;
|
||||
newTrainingItem.LearningTime = trainingItem.LearningTime;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user