Ejemplo n.º 1
0
        public static void LicensePetitionType(IAS.DAL.IASPersonEntities ctx, OracleConnection Connection, LicensePetitionType1314Request licenseRequest)
        {
            Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("th-TH");

            var entLicenseD = ctx.AG_IAS_LICENSE_D.FirstOrDefault(a => a.SEQ_NO == licenseRequest.SEQ_NO && a.UPLOAD_GROUP_NO == licenseRequest.UPLOAD_GROUP_NO);

            // entLicenseD.LICENSE_NO = LicenseNo;
            entLicenseD.LICENSE_DATE = DateTime.Now;

            entLicenseD.LICENSE_EXPIRE_DATE = licenseRequest.EXPIRATION_DATE;

            OracleCommand objCmd = new OracleCommand()
            {
                Connection = Connection, CommandText = "IAS_UPDATE_1314", CommandType = CommandType.StoredProcedure
            };

            objCmd.Parameters.Add("P_LICENSE_NO", OracleDbType.Varchar2).Value = licenseRequest.LICENSE_NO;
            objCmd.Parameters.Add("P_EXPIRE_DATE", OracleDbType.Date).Value    = licenseRequest.RECEIPT_DATE; // Convert.ToDateTime(ReceiveDate);
            objCmd.Parameters.Add("P_RECEIPT_DATE", OracleDbType.Date).Value   = licenseRequest.RECEIPT_DATE; // Convert.ToDateTime(ReceiveDate);
            objCmd.Parameters.Add("P_RECEIPT_NO", OracleDbType.Varchar2).Value = licenseRequest.RECEIPT_NO;   // requestNo;
            objCmd.Parameters.Add("P_PAYMENT_NO", OracleDbType.Varchar2).Value = licenseRequest.PAYMENT_NO;
            objCmd.Parameters.Add("P_REQUEST_NO", OracleDbType.Varchar2).Value = SetValue(licenseRequest.REQUEST_NO);
            objCmd.Parameters.Add("PV_CODE", OracleDbType.Varchar2).Value      = licenseRequest.AREA; // area;
            objCmd.ExecuteNonQuery();
        }
Ejemplo n.º 2
0
 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():"";
 }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        private static ExamFileDetail CreateExamFileDetail(IAS.DAL.IASPersonEntities ctx, String rawData, Int32 rownum)
        {
            String[] data = rawData.Split('|');

            ExamFileDetail detail = new ExamFileDetail(ctx)
            {
                SEQ_NO = rownum.ToString("0000"),

                SEAT_NO        = data.GetIndexOf(1),
                ID_CARD_NO     = data.GetIndexOf(2),
                TITLE          = data.GetIndexOf(3),
                NAMES          = data.GetIndexOf(4),
                LAST_NAME      = data.GetIndexOf(5),
                ADDRESS1       = data.GetIndexOf(6),
                ADDRESS2       = data.GetIndexOf(7),
                AREA_CODE      = data.GetIndexOf(8),
                BIRTH_DATE     = data.GetIndexOf(9).String_dd_MM_yyyy_ToDate('/', true),
                SEX            = data.GetIndexOf(10),
                EDUCATION_CODE = data.GetIndexOf(11),
                COMP_CODE      = data.GetIndexOf(12),
                APPROVE_DATE   = data.GetIndexOf(13).String_dd_MM_yyyy_ToDate('/', true),
                EXAM_RESULT    = data.GetIndexOf(14),
                SCORE_1        = data.GetIndexOf(15),
                SCORE_2        = data.GetIndexOf(16),
                SCORE_3        = data.GetIndexOf(17),
                SCORE_4        = data.GetIndexOf(18),
                SCORE_5        = data.GetIndexOf(19),
                SCORE_6        = data.GetIndexOf(20),
                SCORE_7        = data.GetIndexOf(21),
                SCORE_8        = data.GetIndexOf(22),
                SCORE_9        = data.GetIndexOf(23),
                SCORE_10       = data.GetIndexOf(24),
                SCORE_11       = data.GetIndexOf(25),
                SCORE_12       = data.GetIndexOf(26),
                SCORE_13       = data.GetIndexOf(27),
                SCORE_14       = data.GetIndexOf(28),
                SCORE_15       = data.GetIndexOf(29),
                SCORE_16       = data.GetIndexOf(30),
            };

            return(detail);
        }
Ejemplo n.º 5
0
        public static DTO.ResponseService <ExamFileHeader> ConcreateApplicantFileRequest(IAS.DAL.IASPersonEntities ctx, DTO.ApplicantUploadRequest request)
        {
            DTO.ResponseService <ExamFileHeader> response = new DTO.ResponseService <ExamFileHeader>();

            ExamFileHeader header = CreateExamFileHeader(ctx, request);
            Int32          row    = 0;

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

            return(response);
        }