public ExamFileHeader(ExamFileHeaderRequest request) { _ctx = request.Context; UPLOAD_GROUP_NO = OracleDB.GetGenAutoId(); _createBy = request.UserProfile; ASSOCIATE_NAME = ExamSubStringHelper.Get(request.LineData, 1, 80).Trim(); LICENSE_TYPE_CODE = ExamSubStringHelper.Get(request.LineData, 81, 2).Trim(); PROVINCE_CODE = ExamSubStringHelper.Get(request.LineData, 83, 2).Trim(); ASSOCIATE_CODE = ExamSubStringHelper.Get(request.LineData, 85, 3).Trim(); TESTING_DATE = ExamSubStringHelper.Get(request.LineData, 88, 10).Trim(); EXAM_TIME_CODE = ExamSubStringHelper.Get(request.LineData, 98, 2).Trim(); CNT_PER = request.LineData.Length > 100 ? ExamSubStringHelper.Get(request.LineData, 100, request.LineData.Length).Trim():""; }
private static ExamFileHeader CreateExamFileHeader(IAS.DAL.IASPersonEntities ctx, DTO.ApplicantUploadRequest request) { String header = request.UploadData.Header; ExamFileHeaderRequest headRequest = new ExamFileHeaderRequest() { Context = ctx, FileName = request.FileName, UserProfile = request.UserProfile, LineData = request.UploadData.Header }; ExamFileHeader headerFile = new ExamFileHeader(headRequest); return(headerFile); }