Example #1
0
        public void AddDetail(AG_IAS_APPLICANT_DETAIL_TEMP detial)
        {
            ApplicantFileDetail detail_A = detial as ApplicantFileDetail;

            detail_A.SetHeader(this);
            detail_A.UPLOAD_GROUP_NO = this.UPLOAD_GROUP_NO;
            detail_A.GetBrokenRules();
            _applicantFileDetails.Add(detail_A);
        }
Example #2
0
        public static DTO.ResponseService <ApplicantFileHeader> ConcreateApplicantFileRequest(IAS.DAL.Interfaces.IIASPersonEntities ctx, DTO.ApplicantUploadRequest request)
        {
            DTO.ResponseService <ApplicantFileHeader> response = new DTO.ResponseService <ApplicantFileHeader>();

            ApplicantFileHeader header = CreateApplicantFileHeader(ctx, request);
            Int32 row = 0;

            foreach (String record in request.UploadData.Body)
            {
                row++;
                ApplicantFileDetail detail = CreateApplicantFileDetail(ctx, record, row);
                header.AddDetail(detail);
            }
            response.DataResponse = header;

            return(response);
        }
Example #3
0
        private static ApplicantFileDetail CreateApplicantFileDetail(IAS.DAL.Interfaces.IIASPersonEntities ctx, String rawData, Int32 rownum)
        {
            String[] data = rawData.Split(',');

            ApplicantFileDetail detail = new ApplicantFileDetail(ctx)
            {
                SEQ_NO          = rownum.ToString("0000"),
                LOAD_STATUS     = "",
                APPLICANT_CODE  = PhaseAppliantCodeHelper.Phase(data.GetIndexOf(0)),
                ID_CARD_NO      = data.GetIndexOf(1),
                PRE_NAME_CODE   = PreNameHelper.ConvertToCode(ctx, data.GetIndexOf(2)),
                NAMES           = data.GetIndexOf(3),
                LASTNAME        = data.GetIndexOf(4),
                BIRTH_DATE      = PhaseDateHelper.PhaseToDateNull(data.GetIndexOf(5)),
                SEX             = PhaseSex(data.GetIndexOf(6)),
                EDUCATION_CODE  = EducationCodeHelper.Phase(data.GetIndexOf(7)),
                ADDRESS1        = data.GetIndexOf(9),
                AREA_CODE       = data.GetIndexOf(10),
                INSUR_COMP_CODE = data.GetIndexOf(8),
                TITLE           = data.GetIndexOf(2),
            };

            return(detail);
        }
Example #4
0
        public void AddDetail(ApplicantFileDetail detail)
        {
            detail.SetHeader(this);
            detail.UPLOAD_GROUP_NO = this.UPLOAD_GROUP_NO;

            detail.TESTING_NO      = TestingNumber;
            detail.EXAM_PLACE_CODE = this.PROVINCE_CODE + this.COMP_CODE;
            detail.APPLY_DATE      = ApplyDate;
            detail.USER_ID         = CreateBy.Id;
            detail.USER_DATE       = _applyDate;

            IEnumerable <BusinessRule> rules = detail.GetBrokenRules();

            if (rules != null && rules.Count() > 0)
            {
                StringBuilder errmsg = new StringBuilder("");
                foreach (BusinessRule rule in rules)
                {
                    errmsg.AppendLine(rule.Rule);
                }
                detail.ERROR_MSG = errmsg.ToString();
            }
            _applicantFileDetails.Add(detail);
        }