0514
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using BLL;
|
||||
using Model;
|
||||
|
||||
namespace WebAPI.Controllers
|
||||
{
|
||||
@@ -350,6 +351,32 @@ namespace WebAPI.Controllers
|
||||
responeData.code = 2;
|
||||
responeData.data = new { testRecordId };
|
||||
}
|
||||
else
|
||||
{
|
||||
Training_TestRecord training_TestRecord = new Training_TestRecord();
|
||||
training_TestRecord.TestRecordId = Guid.NewGuid().ToString();
|
||||
training_TestRecord.ProjectId = projectId;
|
||||
training_TestRecord.CompanyTrainingItemId = getCompanyTraining.CompanyTrainingItemId;
|
||||
training_TestRecord.TestManId = person.PersonId;
|
||||
db.Training_TestRecord.InsertOnSubmit(training_TestRecord);
|
||||
db.SubmitChanges();
|
||||
string testRecordId = APITestRecordService.CreateTestRecordItem(getCompanyTraining, training_TestRecord.TestRecordId, person, user);
|
||||
responeData.code = 2;
|
||||
responeData.data = new { testRecordId };
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Training_TestRecord training_TestRecord = new Training_TestRecord();
|
||||
training_TestRecord.TestRecordId = Guid.NewGuid().ToString();
|
||||
training_TestRecord.ProjectId = projectId;
|
||||
training_TestRecord.CompanyTrainingItemId= getCompanyTraining.CompanyTrainingItemId;
|
||||
training_TestRecord.TestManId = user.UserId;
|
||||
db.Training_TestRecord.InsertOnSubmit(training_TestRecord);
|
||||
db.SubmitChanges();
|
||||
string testRecordId = APITestRecordService.CreateTestRecordItem(getCompanyTraining, training_TestRecord.TestRecordId, person, user);
|
||||
responeData.code = 2;
|
||||
responeData.data = new { testRecordId };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user