Пример #1
0
        public async Task <int> SavePersonInfo(PersonalInfoDTO personalInfoDto, string entityId)
        {
            using (var cardtrendentities = new pdb_ccmsContext(_connectionString))
            {
                IssMessageDTO issMessage = new IssMessageDTO();
                var           parameters = new object[] { Common.Helpers.Common.GetIssueNo(), personalInfoDto.EntityId, personalInfoDto.Title, personalInfoDto.FirstName, personalInfoDto.LastName,
                              personalInfoDto.NewIcType, personalInfoDto.NewIc, personalInfoDto.OldIcType, personalInfoDto.OldIc, personalInfoDto.Gender,
                              personalInfoDto.DOB, NumberExtensions.ConvertDecimalToDb(personalInfoDto.IncomeBK), personalInfoDto.Occupation, personalInfoDto.DeptId, personalInfoDto.DrivingLic };
                var paramNameList = new[]
                {
                    "@IssNo",
                    "@EntityId",
                    "@Title",
                    "@FirstName",
                    "@LastName",
                    "@NewIcType",
                    "@NewIc",
                    "@OldIcType",
                    "@OldIc",
                    "@Gender",
                    "@DOB",
                    "@Income",
                    "@Occupation",
                    "@DeptId",
                    "@DrivingLic"
                };
                var paramCollection = BuildParameterListWithRrn(parameters, paramNameList);
                var result          = await cardtrendentities.Database.ExecuteSqlCommandAsync(BuildSqlCommandWithRrn("WebEntityMaint", paramCollection), paramCollection.ToArray());

                var resultCode = paramCollection.Where(x => x.ParameterName == "@RETURN_VALUE").FirstOrDefault().Value;
                return(Convert.ToInt32(resultCode));
            }
        }
        protected override void Configure()
        {
            this.CreateMap <CardAppcInfoDTO, CardAppcInfoModel>()
            .ForMember(d => d.DialogueInd, m => m.Ignore())
            .ForMember(d => d.SKDSNo, m => m.Ignore())
            .ForMember(d => d.CardType, m => m.Ignore())
            .ForMember(d => d.PinInd, m => m.Ignore())
            .ForMember(d => d.JoiningFee, m => m.Ignore())
            .ForMember(d => d.CostCentre, m => m.Ignore())
            .ForMember(d => d.BranchCd, m => m.Ignore())
            .ForMember(d => d.DeptCd, m => m.Ignore())
            .ForMember(d => d.CardMedia, m => m.Ignore())

            .ForMember(d => d.AppcId, m => m.MapFrom(src => NumberExtensions.ConvertLong(src.AppcId)))
            .ForMember(d => d.CardType, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.CardTypeLst)))
            .ForMember(d => d.CardNo, m => m.MapFrom(src => src.CardNo))
            .ForMember(d => d.DriverName, m => m.MapFrom(src => src.DriverName))
            .ForMember(d => d.SelectedSKDSNo, m => m.MapFrom(src => src.SKDSNo))
            .ForMember(d => d.vehRegNo, m => m.MapFrom(src => src.VehRegsNo))
            .ForMember(d => d.SelectedCurrentStatus, m => m.MapFrom(src => src.Sts))
            .ForMember(d => d.SKDSInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.SKDSInd)))
            .ForMember(d => d.SKDSQuota, m => m.MapFrom(src => src.SKDSQuota.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.SKDSQuota)) : ""))
            .ForMember(d => d.PushAlertInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.PushAlertInd)))
            .ForMember(d => d.LitreLimit, m => m.MapFrom(src => src.LitLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.LitLimit)) : ""))
            .ForMember(d => d.TxnLimit, m => m.MapFrom(src => src.TxnLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TxnLimit)) : ""))
            .ForMember(d => d.PINExceedCnt, m => m.MapFrom(src => src.PINExceedCnt.HasValue ? Convert.ToInt32(src.PINExceedCnt) : 0))

            .ForMember(d => d.SelectedPinInd, m => m.MapFrom(src => src.PINInd))
            .ForMember(d => d.OdometerReadingInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.OdometerInd)))
            .ForMember(d => d.SelectedVehicleModel, m => m.MapFrom(src => src.Model))
            .ForMember(d => d.EmbossName, m => m.MapFrom(src => src.EmbName))
            .ForMember(d => d.SelectedCardType, m => m.MapFrom(src => src.CardType))
            .ForMember(d => d.SelectedDialogueInd, m => m.MapFrom(src => src.DialogueInd))
            .ForMember(d => d.SelectedCostCentre, m => m.MapFrom(src => src.CostCentre))
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => src.AcctNo))
            .ForMember(d => d.PriAppcId, m => m.MapFrom(src => src.PriAppcId.HasValue? src.PriAppcId:0))
            .ForMember(d => d.PrimaryCard, m => m.MapFrom(src => src.PrimaryCard))
            .ForMember(d => d.SelectedJoining, m => m.MapFrom(src => src.JoiningFeeCd))
            .ForMember(d => d.SelectedAnnualFee, m => m.MapFrom(src => src.AnnlFeeCd))
            .ForMember(d => d.SelectedCardMedia, m => m.MapFrom(src => src.CardMedia))
            .ForMember(d => d.SelectedBranchCd, m => m.MapFrom(src => src.BranchCd))
            .ForMember(d => d.SelectedDivisionCode, m => m.MapFrom(src => src.DivisionCd))
            .ForMember(d => d.SelectedDeptCd, m => m.MapFrom(src => src.DeptCd))
            .ForMember(d => d.SelectedProductUtilization, m => m.MapFrom(src => src.ProdGroup))

            .ForMember(d => d.BranchCd, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.BranchCdLst)))
            .ForMember(d => d.DivisionCode, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.DivisionCodeLst)))
            .ForMember(d => d.DeptCd, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.DeptCdLst)))
            ;
            this.CreateMap <CardAppcInfoModel, CardAppcInfoDTO>()
            .ForMember(d => d.DialogueInd, m => m.Ignore())
            .ForMember(d => d.SKDSNo, m => m.Ignore())
            .ForMember(d => d.CardType, m => m.Ignore())
            .ForMember(d => d.CostCentre, m => m.Ignore())
            .ForMember(d => d.BranchCd, m => m.Ignore())
            .ForMember(d => d.DeptCd, m => m.Ignore())
            .ForMember(d => d.CardMedia, m => m.Ignore())
            .ForMember(d => d.AppcId, m => m.MapFrom(src => Convert.ToInt32(src.AppcId)))
            .ForMember(d => d.CardType, m => m.MapFrom(src => src.SelectedCardType))
            .ForMember(d => d.SKDSNo, m => m.MapFrom(src => src.SelectedSKDSNo))
            .ForMember(d => d.VehRegsNo, m => m.MapFrom(src => src.vehRegNo))
            .ForMember(d => d.Sts, m => m.MapFrom(src => src.SelectedCurrentStatus))
            .ForMember(d => d.SKDSInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.SKDSInd)))
            .ForMember(d => d.SKDSQuota, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.SKDSQuota)))
            .ForMember(d => d.PushAlertInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.PushAlertInd)))
            .ForMember(d => d.LitLimit, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.LitreLimit)))
            .ForMember(d => d.TxnLimit, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.TxnLimit)))
            .ForMember(d => d.PINExceedCnt, m => m.MapFrom(src => Convert.ToByte(src.PINExceedCnt)))
            .ForMember(d => d.PINInd, m => m.MapFrom(src => src.SelectedPinInd))
            .ForMember(d => d.OdometerInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.OdometerReadingInd)))
            .ForMember(d => d.Model, m => m.MapFrom(src => src.SelectedVehicleModel))
            .ForMember(d => d.EmbName, m => m.MapFrom(src => src.EmbossName))
            .ForMember(d => d.CardType, m => m.MapFrom(src => src.SelectedCardType))
            .ForMember(d => d.DialogueInd, m => m.MapFrom(src => src.SelectedDialogueInd))
            .ForMember(d => d.CostCentre, m => m.MapFrom(src => src.SelectedCostCentre))
            .ForMember(d => d.PriAppcId, m => m.MapFrom(src => src.PriAppcId))
            .ForMember(d => d.PrimaryCard, m => m.MapFrom(src => src.PrimaryCard))
            .ForMember(d => d.JoiningFeeCd, m => m.MapFrom(src => src.SelectedJoining))
            .ForMember(d => d.AnnlFeeCd, m => m.MapFrom(src => src.SelectedAnnualFee))
            .ForMember(d => d.CardMedia, m => m.MapFrom(src => src.SelectedCardMedia))
            .ForMember(d => d.BranchCd, m => m.MapFrom(src => src.SelectedBranchCd))
            .ForMember(d => d.DivisionCd, m => m.MapFrom(src => src.SelectedDivisionCode))
            .ForMember(d => d.DeptCd, m => m.MapFrom(src => src.SelectedDeptCd))
            .ForMember(d => d.ProdGroup, m => m.MapFrom(src => src.SelectedProductUtilization))
            .ForMember(d => d.BranchCdLst, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.BranchCd)))
            .ForMember(d => d.DivisionCodeLst, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.DivisionCode)))
            .ForMember(d => d.DeptCdLst, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.DeptCd)))
            ;
            this.CreateMap <CardFinancialInfoModel, CardFinancialInfoDTO>()
            .ForMember(d => d.TxnLimit, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.txnLimit)))
            .ForMember(d => d.LitLimit, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.litLimit)))
            .ForMember(d => d.PinExceedCnt, m => m.MapFrom(src => NumberExtensions.ConvertIntToDb(src.PinAttempted)))
            .ForMember(d => d.PinAttempted, m => m.MapFrom(src => NumberExtensions.ConvertIntToDb(src.PinAttempted)))
            .ForMember(d => d.PinTriedUpdDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.PinTriedUpdDate)))
            ;
            this.CreateMap <CardFinancialInfoDTO, CardFinancialInfoModel>()
            .ForMember(d => d.txnLimit, m => m.MapFrom(src => src.TxnLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", (src.TxnLimit)))  : ""))
            .ForMember(d => d.litLimit, m => m.MapFrom(src => src.TxnLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", (src.LitLimit)))  : ""))
            .ForMember(d => d.PinExceedCnt, m => m.MapFrom(src => src.PinExceedCnt.HasValue ? Convert.ToInt32(src.PinExceedCnt) : 0))
            .ForMember(d => d.PinAttempted, m => m.MapFrom(src => Convert.ToInt32(src.PinAttempted)))
            .ForMember(d => d.PinTriedUpdDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.PinTriedUpdDate)))
            ;

            this.CreateMap <AccountCaoDTO, CreditAssesOperation>()
            .ForMember(d => d.TerritoryCd, m => m.Ignore())
            .ForMember(d => d.RiskCategory, m => m.Ignore())
            .ForMember(d => d.remarkHistory, m => m.Ignore())
            .ForMember(d => d.AssesmtType, m => m.Ignore())
            .ForMember(d => d.BankAcctType, m => m.Ignore())
            .ForMember(d => d.BankName, m => m.Ignore())
            .ForMember(d => d.DepositType, m => m.Ignore())
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.PaymentMode, m => m.Ignore())
            .ForMember(d => d.PaymentTerm, m => m.Ignore())
            .ForMember(d => d.Quantitative, m => m.Ignore())
            .ForMember(d => d.Qualitative, m => m.Ignore())
            .ForMember(d => d.CreditLimit, m => m.MapFrom(src => src.CreditLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.CreditLimit)) : ""))
            .ForMember(d => d.SelectedPaymentMode, m => m.MapFrom(src => !string.IsNullOrEmpty(src.PymtMode)? src.PymtMode : "0"))
            .ForMember(d => d.SelectedPaymentTerm, m => m.MapFrom(src => src.PymtTerms))
            .ForMember(d => d.TxnAmtLimit, m => m.MapFrom(src => src.TxnAmtLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TxnAmtLimit)) : ""))
            .ForMember(d => d.TxnLitLimit, m => m.MapFrom(src => src.TxnLitLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TxnLitLimit)) : ""))
            .ForMember(d => d.SelectedTerritoryCd, m => m.MapFrom(src => src.SaleTerritory))
            .ForMember(d => d.SelectedRiskCategry, m => m.MapFrom(src => string.IsNullOrEmpty(src.RiskCategory) ? "1" : src.RiskCategory))
            .ForMember(d => d.SelectedAssesmtType, m => m.MapFrom(src => src.AssessmentType))
            .ForMember(d => d.SecurityAmt, m => m.MapFrom(src => src.SecurityAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.SecurityAmt)) : ""))
            .ForMember(d => d.DirectDebitInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.DirectDebitInd)))
            .ForMember(d => d.SelectedDepositType, m => m.MapFrom(src => src.DepositType))

            .ForMember(d => d.DepositExp, m => m.MapFrom(src => NumberExtensions.DateConverter(src.DepositExp)))
            .ForMember(d => d.SelectedBankAcctType, m => m.MapFrom(src => src.BankAcctType))
            .ForMember(d => d.SelectedBankName, m => m.MapFrom(src => src.BankName))

            //.ForMember(d => d.BankBranchCode, m => m.MapFrom(src => src.SAPRefNo))
            .ForMember(d => d.DepositFromDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.EffFromDate)))
            .ForMember(d => d.DepositToDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.EffToDate)))

            .ForMember(d => d.BankAcctNo, m => m.MapFrom(src => src.BankAcctNo))
            .ForMember(d => d.BankBranchCode, m => m.MapFrom(src => src.BGSerialNo))
            .ForMember(d => d.DepositAmt, m => m.MapFrom(src => src.DepositAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.DepositAmt)) : ""))

            .ForMember(d => d.ValidityDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.ValidityDate)))
            .ForMember(d => d.NRID, m => m.MapFrom(src => NumberExtensions.DateConverter(src.NRID)))
            .ForMember(d => d.SelectedReasonCode, m => m.MapFrom(src => src.ReasonCd))

            .ForMember(d => d.AppvUserIdQAOff, m => m.MapFrom(src => src.AppvUserId1))
            .ForMember(d => d.SelectedAppvStsQAOff, m => m.MapFrom(src => src.AppvSts1))
            .ForMember(d => d.AppvDateQAOff, m => m.MapFrom(src => NumberExtensions.DateConverter(src.AppvDate1)))

            .ForMember(d => d.AppvUserIdBackOff, m => m.MapFrom(src => src.AppvUserId2))
            .ForMember(d => d.SelectedAppvStsBackOff, m => m.MapFrom(src => src.AppvSts2))
            .ForMember(d => d.AppvDateBackOff, m => m.MapFrom(src => NumberExtensions.DateConverter(src.AppvDate2)))

            .ForMember(d => d.AppvUserIdEDP, m => m.MapFrom(src => src.AppvUserId4))
            .ForMember(d => d.SelectedAppvStsEDP, m => m.MapFrom(src => src.AppvSts4))
            .ForMember(d => d.AppvDateEDP, m => m.MapFrom(src => NumberExtensions.DateConverter(src.AppvDate4)))

            .ForMember(d => d.Txnid, m => m.MapFrom(src => src.TxnId))
            .ForMember(d => d.Creationdt, m => m.MapFrom(src => NumberExtensions.DateConverter(src.CreationDate)))
            .ForMember(d => d.remarks, m => m.MapFrom(src => src.Remarks))
            .ForMember(d => d.SelectedQuantitative, m => m.MapFrom(src => src.Quantitativerating))
            .ForMember(d => d.SelectedQualitative, m => m.MapFrom(src => src.Qualitativerating))

            .ForMember(d => d.ProposeCreditLimit, m => m.MapFrom(src => src.PropCreditLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.PropCreditLimit)) : ""))
            .ForMember(d => d.RecommendCreditLimit, m => m.MapFrom(src => src.RecCreditLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.RecCreditLimit)) : ""))
            .ForMember(d => d.ProposeSecurityAmt, m => m.MapFrom(src => src.PropSecurityAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.PropSecurityAmt)) : ""))

            .ForMember(d => d.RecommendSecurityAmt, m => m.MapFrom(src => src.RecSecurityAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.RecSecurityAmt)) : ""))
            .ForMember(d => d.DocPath, m => m.MapFrom(src => src.DocPath))
            .ForMember(d => d.SelectedTradingArea, m => m.MapFrom(src => src.TradingArea))
            //.ForMember(d => d.remarkHistory, m => m.MapFrom(s => CustomMapperExtensions.MapIEnumerableToList(s.remarkHistory)))
            ;

            this.CreateMap <CreditAssesOperation, AccountCaoDTO>()
            .ForMember(d => d.RiskCategory, m => m.Ignore())
            .ForMember(d => d.BankAcctType, m => m.Ignore())
            .ForMember(d => d.BankName, m => m.Ignore())
            .ForMember(d => d.DepositType, m => m.Ignore())
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => src.acctNo))
            .ForMember(d => d.CreditLimit, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.CreditLimit)))
            .ForMember(d => d.PymtTerms, m => m.MapFrom(src => Convert.ToInt32(src.SelectedPaymentTerm)))
            .ForMember(d => d.TxnAmtLimit, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.TxnAmtLimit)))
            .ForMember(d => d.TxnLitLimit, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.TxnLitLimit)))
            .ForMember(d => d.SaleTerritory, m => m.MapFrom(src => src.SelectedTerritoryCd))
            .ForMember(d => d.RiskCategory, m => m.MapFrom(src => src.SelectedRiskCategry))
            .ForMember(d => d.AssessmentType, m => m.MapFrom(src => src.SelectedAssesmtType))

            //.ForMember(d => d.SecurityAmt, m => m.MapFrom(src => src.SecurityAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.SecurityAmt)) : ""))
            .ForMember(d => d.DirectDebitInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.DirectDebitInd)))
            .ForMember(d => d.DepositType, m => m.MapFrom(src => src.SelectedDepositType))

            .ForMember(d => d.DepositExp, m => m.MapFrom(src => NumberExtensions.DateConverter(src.DepositExp)))
            .ForMember(d => d.BankAcctType, m => m.MapFrom(src => src.SelectedBankAcctType))
            .ForMember(d => d.BankName, m => m.MapFrom(src => src.SelectedBankName))

            .ForMember(d => d.BankAcctNo, m => m.MapFrom(src => src.BankAcctNo))
            .ForMember(d => d.BankBranchCd, m => m.MapFrom(src => src.BankBranchCode))
            .ForMember(d => d.DepositAmt, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.DepositAmt)))

            .ForMember(d => d.ValidityDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.ValidityDate)))
            .ForMember(d => d.NRID, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.NRID)))
            .ForMember(d => d.ReasonCd, m => m.MapFrom(src => src.SelectedReasonCode))

            .ForMember(d => d.AppvUserId1, m => m.MapFrom(src => src.AppvUserIdQAOff))
            .ForMember(d => d.AppvSts1, m => m.MapFrom(src => src.SelectedAppvStsQAOff))
            .ForMember(d => d.AppvDate1, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.AppvDateQAOff)))

            .ForMember(d => d.AppvUserId2, m => m.MapFrom(src => src.AppvUserIdBackOff))
            .ForMember(d => d.AppvSts2, m => m.MapFrom(src => src.SelectedAppvStsBackOff))
            .ForMember(d => d.AppvDate2, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.AppvDateBackOff)))

            .ForMember(d => d.AppvUserId4, m => m.MapFrom(src => src.AppvUserIdEDP))
            .ForMember(d => d.AppvSts4, m => m.MapFrom(src => src.SelectedAppvStsEDP))
            .ForMember(d => d.AppvDate4, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.AppvDateEDP)))
            .ForMember(d => d.PymtMode, m => m.MapFrom(src => src.SelectedPaymentMode))

            .ForMember(d => d.Remarks, m => m.MapFrom(src => src.remarks))
            .ForMember(d => d.Quantitativerating, m => m.MapFrom(src => src.SelectedQuantitative))
            .ForMember(d => d.Qualitativerating, m => m.MapFrom(src => src.SelectedQualitative))

            .ForMember(d => d.PropCreditLimit, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.ProposeCreditLimit)))
            .ForMember(d => d.RecCreditLimit, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.RecommendCreditLimit)))
            .ForMember(d => d.PropSecurityAmt, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.ProposeSecurityAmt)))

            .ForMember(d => d.RecSecurityAmt, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.RecommendSecurityAmt)))
            .ForMember(d => d.DocPath, m => m.MapFrom(src => src.DocPath))
            .ForMember(d => d.TradingArea, m => m.MapFrom(src => src.SelectedTradingArea))
            ;
            this.CreateMap <WebSecDepRemarksDTO, RemarkHistory>()
            .ForMember(d => d.Content, m => m.MapFrom(src => src.RemarkHistory))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => src.CreationDate))
            .ForMember(d => d.UserId, m => m.MapFrom(src => src.CreatedBy))
            ;

            this.CreateMap <AcctDepositInfoDTO, CreditAssesOperation>()
            .ForMember(d => d.TerritoryCd, m => m.Ignore())
            .ForMember(d => d.RiskCategory, m => m.Ignore())
            .ForMember(d => d.remarkHistory, m => m.Ignore())
            .ForMember(d => d.AssesmtType, m => m.Ignore())
            .ForMember(d => d.BankAcctType, m => m.Ignore())
            .ForMember(d => d.BankName, m => m.Ignore())
            .ForMember(d => d.DepositType, m => m.Ignore())
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.PaymentMode, m => m.Ignore())
            .ForMember(d => d.PaymentTerm, m => m.Ignore())
            .ForMember(d => d.Quantitative, m => m.Ignore())
            .ForMember(d => d.Qualitative, m => m.Ignore())
            .ForMember(d => d.DirectDebitInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.DirectDebitInd)))
            .ForMember(d => d.SelectedDepositType, m => m.MapFrom(src => src.DepositType))
            .ForMember(d => d.SelectedBankAcctType, m => m.MapFrom(src => src.BankAcctType))
            .ForMember(d => d.SelectedBankName, m => m.MapFrom(src => src.BankName))
            .ForMember(d => d.BankAcctNo, m => m.MapFrom(src => src.BankAcctNo))
            .ForMember(d => d.DepositAmt, m => m.MapFrom(src => src.DepositAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.DepositAmt)) : ""))
            .ForMember(d => d.Txnid, m => m.MapFrom(src => src.TxnId))
            .ForMember(d => d.Creationdt, m => m.MapFrom(src => src.CreationDate))
            .ForMember(d => d.DepositFromDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.DepositFromDate)))
            .ForMember(d => d.DepositToDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.DepositToDate)))
            .ForMember(d => d.BgSerialNo, m => m.MapFrom(src => src.BGSerialNo))
            .ForMember(d => d.SecurityAmt, m => m.MapFrom(src => src.SecurityDeposit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.SecurityDeposit)) : ""))
            .ForMember(d => d.SAPRefNo, m => m.MapFrom(src => src.SAPRefNo))
            .ForMember(d => d.ValidityDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.ValidityDate)))
            ;
        }
        protected override void Configure()
        {
            this.CreateMap <ManualSlipEntryDTO, ManualSlipEntry>()
            .ForMember(d => d.BusnLocation, m => m.MapFrom(src => src.Dealer))
            .ForMember(d => d.SelectedTermId, m => m.MapFrom(src => src.TerminalId))
            .ForMember(d => d.SiteId, m => m.MapFrom(src => src.SiteId))
            .ForMember(d => d.InvoiceNo, m => m.MapFrom(src => src.InvoiceNo))
            .ForMember(d => d.SettleDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.SettleDate)))
            .ForMember(d => d.TotalCnt, m => m.MapFrom(src => src.TotalCount))
            .ForMember(d => d.DisplayTotalAmt, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TotalAmount))))
            .ForMember(d => d.Descp, m => m.MapFrom(src => src.Description))
            .ForMember(d => d.SelectedSts, m => m.MapFrom(src => src.Status))
            .ForMember(d => d.TxnDescp, m => m.MapFrom(src => src.TxnDescription))
            .ForMember(d => d._CreationDatenUserId, m => m.ResolveUsing(model => new CreationDatenUserId()
            {
                UserId = model.UserId, CreationDate = CardTrend.Common.Extensions.NumberExtensions.DateConverter(model.CreationDate)
            }))
            ;
            this.CreateMap <MerchManualTxnDTO, ManualSlipEntry>()
            .ForMember(d => d.TxnCd, m => m.Ignore())
            .ForMember(d => d.VATCd, m => m.Ignore())
            .ForMember(d => d.TermId, m => m.Ignore())
            .ForMember(d => d.Sts, m => m.Ignore())
            .ForMember(d => d.ProdCd, m => m.Ignore())
            .ForMember(d => d.SelectedProdCd, m => m.MapFrom(src => src.ProdCd))
            .ForMember(d => d.Quantity, m => m.MapFrom(src => src.Quantity.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.000}", src.Quantity.Value)) : "0.000"))
            .ForMember(d => d.ProdAmt, m => m.MapFrom(src => src.ProdAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.ProdAmt.Value)) : "0.00"))
            .ForMember(d => d.UnitPrice, m => m.MapFrom(src => src.UnitPrice.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.UnitPrice.Value)) : "0.00"))
            .ForMember(d => d.VATRate, m => m.MapFrom(src => src.VATRate.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.VATRate.Value)) : "0.00"))
            .ForMember(d => d.SelectedVATCd, m => m.MapFrom(src => src.VATCd))
            .ForMember(d => d.SelectedSts, m => m.MapFrom(src => src.Sts))
            .ForMember(d => d.SelectedTermId, m => m.MapFrom(src => src.TerminalId))
            .ForMember(d => d.SelectedTxnCd, m => m.MapFrom(src => src.TxnCd))
            .ForMember(d => d.RcptNo, m => m.MapFrom(src => src.ReceiptNo))
            .ForMember(d => d.BusnLocation, m => m.MapFrom(src => src.Dealer))
            .ForMember(d => d.AppvCd, m => m.MapFrom(src => src.AuthNo))
            .ForMember(d => d.TxnDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.TransactionDate)))
            .ForMember(d => d.AuthCardNo, m => m.MapFrom(src => src.DriverCard))
            .ForMember(d => d.DisplayTxnAmt, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TxnAmount))))
            .ForMember(d => d.VATAmt, m => m.MapFrom(src => src.VATAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.VATAmt.Value)) : "0.00"))
            .ForMember(d => d.Descp, m => m.MapFrom(src => src.Description))
            .ForMember(d => d.ProdDesc, m => m.MapFrom(src => src.Description))
            .ForMember(d => d.TotalAmt, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TxnAmount))))
            .ForMember(d => d.DisplayTotalAmt, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TxnAmount))))
            .ForMember(d => d.AuthNo, m => m.MapFrom(src => src.AuthNo))
            .ForMember(d => d.Odometer, m => m.MapFrom(src => src.OdometerReading))
            .ForMember(d => d.ArrayCnt, m => m.MapFrom(src => src.ArrayCount))
            .ForMember(d => d.Stans, m => m.MapFrom(src => src.Stan))
            .ForMember(d => d.Rrn, m => m.MapFrom(src => Convert.ToString(src.Rrn)))
            .ForMember(d => d._CreationDatenUserId, m => m.ResolveUsing(model => new CreationDatenUserId()
            {
                UserId = model.UserId, CreationDate = NumberExtensions.DateConverter(model.CreationDate)
            }))
            ;

            this.CreateMap <ManualSlipEntry, MerchManualTxnDTO>()
            .ForMember(d => d.TxnCd, m => m.MapFrom(src => src.SelectedTxnCd))
            .ForMember(d => d.Dealer, m => m.MapFrom(src => src.BusnLocation))
            .ForMember(d => d.TerminalId, m => m.MapFrom(src => src.SelectedTermId))
            .ForMember(d => d.ReceiptNo, m => m.MapFrom(src => src.RcptNo))
            .ForMember(d => d.VATCd, m => m.MapFrom(src => src.SelectedVATCd))
            .ForMember(d => d.ProdAmt, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.ProdAmt)))
            .ForMember(d => d.ProdCd, m => m.MapFrom(src => src.SelectedProdCd))
            .ForMember(d => d.InvoiceNo, m => m.MapFrom(src => Convert.ToInt32(src.InvoiceNo)))
            .ForMember(d => d.Stan, m => m.MapFrom(src => Convert.ToInt32(src.Stans)))
            .ForMember(d => d.Rrn, m => m.MapFrom(src => Convert.ToInt64(src.Rrn)))
            .ForMember(d => d.CardExpiry, m => m.MapFrom(src => src.CardExpire))
            .ForMember(d => d.DriverCard, m => m.MapFrom(src => src.AuthCardNo))
            .ForMember(d => d.VATAmt, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.VATAmt)))
            .ForMember(d => d.TxnDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.TxnDate)))
            .ForMember(d => d.ArrayCount, m => m.MapFrom(src => Convert.ToInt32(src.ArrayCnt)))
            .ForMember(d => d.Quantity, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.Quantity)))
            .ForMember(d => d.TotalAmt, m => m.MapFrom(src => src.DisplayTotalAmt))
            .ForMember(d => d.Description, m => m.MapFrom(src => src.Descp))
            .ForMember(d => d.OdometerReading, m => m.MapFrom(src => src.Odometer))
            .ForMember(d => d.Sts, m => m.MapFrom(src => src.SelectedSts))
            ;

            this.CreateMap <ManualSlipEntryBatchDetailDTO, ManualSlipEntry>()
            .ForMember(d => d.BusnLocation, m => m.MapFrom(src => src.Dealer))
            .ForMember(d => d.TermId, m => m.Ignore())
            .ForMember(d => d.Sts, m => m.Ignore())
            .ForMember(d => d.SelectedTermId, m => m.MapFrom(src => src.TermId))
            .ForMember(d => d.BatchId, m => m.MapFrom(src => src.BatchId))
            .ForMember(d => d.TxnCd, m => m.Ignore())
            .ForMember(d => d.SelectedTxnCd, m => m.MapFrom(src => src.TxnCd))
            .ForMember(d => d.InvoiceNo, m => m.MapFrom(src => src.InvoiceNo))
            .ForMember(d => d.SettleDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.SettleDate)))
            .ForMember(d => d.TotalCnt, m => m.MapFrom(src => src.Cnt))
            .ForMember(d => d.DisplayTotalAmt, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.Amt))))
            .ForMember(d => d.OrigBatchNo, m => m.MapFrom(src => Convert.ToInt32(src.OrigBatchNo)))
            .ForMember(d => d.SelectedSts, m => m.MapFrom(src => src.Sts))
            .ForMember(d => d.Sts, m => m.MapFrom(s => CustomMapperExtensions.MapIEnumerableToList(s.StsList)))
            ;

            this.CreateMap <ManualSlipEntry, ManualSlipEntryBatchDetailDTO>()
            .ForMember(d => d.Dealer, m => m.MapFrom(src => src.BusnLocation))
            .ForMember(d => d.TermId, m => m.Ignore())
            .ForMember(d => d.Sts, m => m.Ignore())
            .ForMember(d => d.TxnCd, m => m.Ignore())
            .ForMember(d => d.TermId, m => m.MapFrom(src => src.SelectedTermId))
            .ForMember(d => d.TxnCd, m => m.MapFrom(src => src.SelectedTxnCd))
            .ForMember(d => d.InvoiceNo, m => m.MapFrom(src => Convert.ToString(src.InvoiceNo)))
            .ForMember(d => d.BatchId, m => m.MapFrom(src => src.BatchId.ToString()))
            .ForMember(d => d.OrigBatchNo, m => m.MapFrom(src => src.OrigBatchNo))
            .ForMember(d => d.SettleDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.SettleDate)))
            .ForMember(d => d.Sts, m => m.MapFrom(src => src.SelectedSts))
            ;
            this.CreateMap <ManualTxnDTO, ManualSlipEntry>()
            .ForMember(d => d.TxnCd, m => m.Ignore())
            .ForMember(d => d.BusnLocation, m => m.MapFrom(src => src.Dealer))
            .ForMember(d => d.SelectedTermId, m => m.MapFrom(src => src.Termid))
            .ForMember(d => d.SelectedTxnCd, m => m.MapFrom(src => src.TxnCd))
            .ForMember(d => d.InvoiceNo, m => m.MapFrom(src => src.InvoiceNo))
            ;
            this.CreateMap <ManualTxnProductDTO, ManualTxnProduct>()
            .ForMember(d => d.BatchId, m => m.MapFrom(src => Convert.ToString(src.BatchId)))
            .ForMember(d => d.SelectedProdCd, m => m.MapFrom(src => src.Prod))
            .ForMember(d => d.Quantity, m => m.MapFrom(src => src.Quantity.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.000}", src.Quantity.Value)) : "0.000"))
            .ForMember(d => d.ProdAmt, m => m.MapFrom(src => src.ProdAmount.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.ProdAmount.Value)) : "0.00"))
            .ForMember(d => d.ProdDesc, m => m.MapFrom(src => src.ProdDescription))
            .ForMember(d => d.LastUpdDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.LastUpdateDate)))
            .ForMember(d => d.VATAmt, m => m.MapFrom(src => src.VATAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.VATAmt.Value)) : "0.00"))
            .ForMember(d => d.VATRate, m => m.MapFrom(src => src.VATRate.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.VATRate.Value)) : "0.00"))
            .ForMember(d => d.SelectedVATCd, m => m.MapFrom(src => src.VATCd))
            .ForMember(d => d._CreationDatenUserId, m => m.ResolveUsing(model => new CreationDatenUserId()
            {
                UserId = model.UserId, CreationDate = CardTrend.Common.Extensions.NumberExtensions.DateConverter(model.CreationDate)
            }))
            ;
        }
Пример #4
0
        public async Task <int> WebEventTypeMaint(EventTypeDTO _LookupParameters, string userId)
        {
            using (var cardtrendentities = new pdb_ccmsContext(_connectionString))
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("EvtNtfyDetailId");
                dt.Columns.Add("MinIntVal");
                dt.Columns.Add("MaxIntVal");
                dt.Columns.Add("MinMoneyVal");
                dt.Columns.Add("MaxMoneyVal");
                dt.Columns.Add("MinDateVal");
                dt.Columns.Add("MaxDateVal");
                dt.Columns.Add("MinTimeVal");
                dt.Columns.Add("MaxTimeVal");
                dt.Columns.Add("VarCharVal");
                dt.Columns.Add("PeriodType");
                dt.Columns.Add("PeriodInterval");
                foreach (var item in _LookupParameters.ProductItems)
                {
                    DataRow dr = dt.NewRow();
                    dr["EvtNtfyDetailId"] = string.IsNullOrEmpty(item.EvtPlanDetailId) ? (object)DBNull.Value : item.EvtPlanDetailId;
                    dr["MinIntVal"]       = NumberExtensions.ConvertLongToDb(item.MinIntVal);
                    dr["MaxIntVal"]       = NumberExtensions.ConvertLongToDb(item.MaxIntVal);
                    dr["MinMoneyVal"]     = NumberExtensions.ConvertDecimalToDb(item.MinMoneyVal);
                    dr["MaxMoneyVal"]     = NumberExtensions.ConvertDecimalToDb(item.MaxMoneyVal);
                    dr["MinDateVal"]      = NumberExtensions.ConvertDatetimeDB(item.MinDateVal);
                    dr["MaxDateVal"]      = NumberExtensions.ConvertDatetimeDB(item.MaxDateVal);
                    dr["MinTimeVal"]      = string.IsNullOrEmpty(item.MinTimeVal) ? (object)DBNull.Value : item.MinTimeVal;
                    dr["MaxTimeVal"]      = string.IsNullOrEmpty(item.MaxTimeVal) ? (object)DBNull.Value : item.MaxTimeVal;
                    dr["VarCharVal"]      = string.IsNullOrEmpty(item.VarCharVal) ? (object)DBNull.Value : item.VarCharVal;
                    dr["PeriodType"]      = string.IsNullOrEmpty(item.PeriodType) ? (object)DBNull.Value : item.PeriodType;
                    dr["PeriodInterval"]  = string.IsNullOrEmpty(item.PeriodInterval) ? (object)DBNull.Value : item.PeriodInterval;
                    dt.Rows.Add(dr);
                }

                var parameters = new[] {
                    new SqlParameter("@EventTypeID", SqlDbType.BigInt)
                    {
                        SqlValue = (object)_LookupParameters.EvtTypeID ?? DBNull.Value
                    },
                    new SqlParameter("@EventPlanId", SqlDbType.BigInt)
                    {
                        SqlValue = (object)_LookupParameters.EvtPlanId ?? DBNull.Value
                    },
                    new SqlParameter("@ShortDescp", SqlDbType.VarChar)
                    {
                        SqlValue = (object)_LookupParameters.ShortDescription ?? DBNull.Value
                    },
                    new SqlParameter("@Type", SqlDbType.VarChar)
                    {
                        SqlValue = (object)_LookupParameters.Type ?? DBNull.Value
                    },
                    new SqlParameter("@Severity", SqlDbType.VarChar)
                    {
                        SqlValue = (object)_LookupParameters.Severity ?? DBNull.Value
                    },
                    new SqlParameter("@Scope", SqlDbType.VarChar)
                    {
                        SqlValue = (object)_LookupParameters.Scope ?? DBNull.Value
                    },
                    new SqlParameter("@Sts", SqlDbType.NVarChar)
                    {
                        SqlValue = (object)_LookupParameters.Status ?? DBNull.Value
                    },
                    new SqlParameter("@Descp", SqlDbType.NVarChar)
                    {
                        SqlValue = (object)_LookupParameters.FullDescription ?? DBNull.Value
                    },
                    new SqlParameter("@CntEvtOccur", SqlDbType.Int)
                    {
                        SqlValue = (object)_LookupParameters.TotalOccurs ?? DBNull.Value
                    },
                    new SqlParameter("@EvtOccurType", SqlDbType.NVarChar)
                    {
                        SqlValue = (object)_LookupParameters.SetFrequencyType ?? DBNull.Value
                    },
                    new SqlParameter("@UserId", SqlDbType.NVarChar)
                    {
                        SqlValue = userId
                    },
                    new SqlParameter("@ChannelInd", SqlDbType.BigInt)
                    {
                        SqlValue = (object)_LookupParameters.NtfyInd ?? DBNull.Value
                    },
                    new SqlParameter("@ApplyAllInd", SqlDbType.VarChar)
                    {
                        SqlValue = (object)_LookupParameters.ApplyAllInd
                    },
                    new SqlParameter("@NtfyEventTbl", SqlDbType.Structured)
                    {
                        SqlValue = dt, TypeName = "NtfyEventTbl"
                    },
                    new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt)
                    {
                        Direction = ParameterDirection.Output
                    }
                };
                await cardtrendentities.Database.ExecuteSqlCommandAsync("exec @RETURN_VALUE = WebEventTypeMaint @EventTypeID,@EventPlanId,@ShortDescp,@Type,@Severity,@Scope,@Sts,@Descp,@CntEvtOccur,@EvtOccurType,@UserId,@ChannelInd,@ApplyAllInd,@NtfyEventTbl", parameters);

                var resultCode = parameters.Where(x => x.ParameterName == "@RETURN_VALUE").FirstOrDefault().Value;
                return(Convert.ToInt32(resultCode));
            }
        }
Пример #5
0
        protected override void Configure()
        {
            this.CreateMap <ProdRefDTO, LookupParameters>()
            .ForMember(d => d.ProductCategory, m => m.Ignore())
            .ForMember(d => d.ProductType, m => m.Ignore())
            .ForMember(d => d.BillingPlan, m => m.Ignore())
            .ForMember(d => d.Descp, m => m.MapFrom(src => src.ShortDescription))
            .ForMember(d => d.ProductCode, m => m.MapFrom(src => src.ProdCd))
            .ForMember(d => d.SelectedProductCategory, m => m.MapFrom(src => src.ProductCategory))
            .ForMember(d => d.SelectedProductType, m => m.MapFrom(src => src.ProductType))
            .ForMember(d => d.UnitPrice, m => m.MapFrom(src => src.UnitPrice.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.UnitPrice)) : "0.00"))
            .ForMember(d => d.SelectedBillingPlan, m => m.MapFrom(src => Convert.ToString(src.BillingPlan)))
            .ForMember(d => d.EffectiveFrom, m => m.MapFrom(src => src.EffDate))
            .ForMember(d => d.ExpiryDate, m => m.MapFrom(src => src.EffEndDate))
            .ForMember(d => d.LastUpdated, m => m.MapFrom(src => src.UpdateDate))
            ;

            this.CreateMap <LookupParameters, ProdRefDTO>()
            .ForMember(d => d.ProductCategory, m => m.Ignore())
            .ForMember(d => d.ProductType, m => m.Ignore())
            .ForMember(d => d.BillingPlan, m => m.Ignore())
            .ForMember(d => d.ShortDescription, m => m.MapFrom(src => src.Descp))
            .ForMember(d => d.ProdCd, m => m.MapFrom(src => src.ProductCode))
            .ForMember(d => d.ProductCategory, m => m.MapFrom(src => src.SelectedProductCategory))
            .ForMember(d => d.ProductType, m => m.MapFrom(src => src.SelectedProductType))
            .ForMember(d => d.UnitPrice, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.UnitPrice)))
            .ForMember(d => d.BillingPlan, m => m.MapFrom(src => Convert.ToInt32(src.SelectedBillingPlan)))
            .ForMember(d => d.EffDate, m => m.MapFrom(src => src.EffectiveFrom))
            .ForMember(d => d.EffEndDate, m => m.MapFrom(src => src.ExpiryDate))
            .ForMember(d => d.UpdateDate, m => m.MapFrom(src => src.LastUpdated))
            .ForMember(d => d.ProductItems, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.ProductItems)))
            ;

            this.CreateMap <ProdGroupRefDTO, LookupParameters>()
            .ForMember(d => d.ProductGroup, m => m.Ignore())
            .ForMember(d => d.ProductCategory, m => m.Ignore())
            .ForMember(d => d.ProductType, m => m.Ignore())
            .ForMember(d => d.Descp, m => m.MapFrom(src => src.Description))
            .ForMember(d => d.SelectedProductGroup, m => m.MapFrom(src => src.ProductGroup))
            .ForMember(d => d.LastUpdated, m => m.MapFrom(src => Convert.ToString(src.UpdateDate)))
            .ForMember(d => d.UserId, m => m.MapFrom(src => src.UserId))
            .ForMember(d => d.ProductCode, m => m.MapFrom(src => Convert.ToString(src.ProductCode)))
            .ForMember(d => d.SelectedProductCategory, m => m.MapFrom(src => src.ProductCategory))
            .ForMember(d => d.SelectedProductType, m => m.MapFrom(src => src.ProductType))
            ;
            this.CreateMap <TmplDisplayDTO, TmplDisplayer>()
            .ForMember(d => d.ContentTmplt, m => m.MapFrom(src => src.TemplateDisplayer))
            .ForMember(d => d.LangInd, m => m.MapFrom(src => src.TemplateLanguageIndicator))
            ;
            this.CreateMap <LookupParameterDTO, LookupParameters>()
            .ForMember(d => d.ProductCode, m => m.MapFrom(src => src.ProdCd))
            .ForMember(d => d.ProductName, m => m.MapFrom(src => src.ProdName))
            .ForMember(d => d.Descp, m => m.MapFrom(src => src.ProdDescp))
            .ForMember(d => d.SelectedProductCategory, m => m.MapFrom(src => src.ProdCategory))
            .ForMember(d => d.SelectedProductType, m => m.MapFrom(src => src.ProdType))
            .ForMember(d => d.UnitPrice, m => m.MapFrom(src => src.ProdUnitPrice.HasValue ? (Convert.ToString(src.ProdUnitPrice)) : ""))
            .ForMember(d => d.ParameterCode, m => m.MapFrom(src => src.ParamCd))
            .ForMember(d => d.CityCode, m => m.MapFrom(src => src.ParamCd))
            .ForMember(d => d.StateName, m => m.MapFrom(src => src.StateName))
            .ForMember(d => d.StateCode, m => m.MapFrom(src => src.StateCd))
            .ForMember(d => d.CityName, m => m.MapFrom(src => src.City))
            .ForMember(d => d.ParameterDescp, m => m.MapFrom(src => src.Descp))
            .ForMember(d => d.SelectedProductGroup, m => m.MapFrom(src => src.ProductGroup))
            .ForMember(d => d.LastUpdated, m => m.MapFrom(src => src.UpdatedOn))
            .ForMember(d => d.UserId, m => m.MapFrom(src => src.UpdatedBy))
            .ForMember(d => d.ProductItems, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.ProductItems)))
            ;
            this.CreateMap <LookupParameters, LookupParameterDTO>()
            .ForMember(d => d.Type, m => m.MapFrom(src => src.type))
            .ForMember(d => d.StateCd, m => m.MapFrom(src => src.StateCode))
            .ForMember(d => d.ParamCd, m => m.MapFrom(src => src.type.ToLower() == "city" ?src.CityCode: src.ParameterCode))
            .ForMember(d => d.City, m => m.MapFrom(src => src.CityName))
            .ForMember(d => d.Descp, m => m.MapFrom(src => src.Descp))
            .ForMember(d => d.ProductGroup, m => m.MapFrom(src => src.SelectedProductGroup))
            .ForMember(d => d.ProductItems, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.ProductItems)))
            ;
            this.CreateMap <EventTypeDTO, LookupParameters>()
            .ForMember(d => d.Scope, m => m.Ignore())
            .ForMember(d => d.EventTypeId, m => m.MapFrom(src => Convert.ToString(src.EvtTypeID)))
            .ForMember(d => d.EventPlanId, m => m.MapFrom(src => Convert.ToString(src.EvtPlanId)))
            .ForMember(d => d.ShortDescp, m => m.MapFrom(src => src.ShortDescription))
            .ForMember(d => d.TypeDesc, m => m.MapFrom(src => src.ShortDescription))
            .ForMember(d => d.SelectedEventType, m => m.MapFrom(src => src.Type))
            .ForMember(d => d.SelectedPriority, m => m.MapFrom(src => src.Severity))
            .ForMember(d => d.SelectedOwner, m => m.MapFrom(src => src.Scope))
            .ForMember(d => d.SelectedStatus, m => m.MapFrom(src => src.Status))
            .ForMember(d => d.ApplyAllInd, m => m.MapFrom(src => src.ApplyAllInd == "Y" ? true : false))
            .ForMember(d => d.DetailedDescp, m => m.MapFrom(src => src.FullDescription))
            .ForMember(d => d.BitmapAmt, m => m.MapFrom(src => Convert.ToString(src.BitmapAmt)))
            .ForMember(d => d.MaxOccur, m => m.MapFrom(src => Convert.ToString(src.TotalOccurs)))
            .ForMember(d => d.SelectedFrequency, m => m.MapFrom(src => src.SetFrequencyType))
            .ForMember(d => d.MinIntVal, m => m.MapFrom(src => src.MinIntVal.HasValue ? Convert.ToString(src.MinIntVal) : ""))
            .ForMember(d => d.MaxIntVal, m => m.MapFrom(src => src.MaxIntVal.HasValue ? Convert.ToString(src.MaxIntVal) : ""))
            .ForMember(d => d.EvtPlanDetailId, m => m.MapFrom(src => Convert.ToString(src.EvtPlanDetailId)))
            .ForMember(d => d.MinMoneyVal, m => m.MapFrom(src => src.MinMoneyVal.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.MinMoneyVal)) : ""))
            .ForMember(d => d.MaxMoneyVal, m => m.MapFrom(src => src.MaxMoneyVal.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.MaxMoneyVal)) : ""))

            .ForMember(d => d.MinDateVal, m => m.MapFrom(src => src.MinDateVal.HasValue ? NumberExtensions.DateConverter(src.MinDateVal) : ""))
            .ForMember(d => d.MaxDateVal, m => m.MapFrom(src => src.MaxDateVal.HasValue ? NumberExtensions.DateConverter(src.MaxDateVal) : ""))
            .ForMember(d => d.MinTimeVal, m => m.MapFrom(src => src.MinTimeVal.HasValue ? Convert.ToString(src.MinTimeVal) : ""))
            .ForMember(d => d.MaxTimeVal, m => m.MapFrom(src => src.MaxTimeVal.HasValue ? Convert.ToString(src.MaxTimeVal) : ""))

            .ForMember(d => d.PeriodInterval, m => m.MapFrom(src => Convert.ToString(src.PeriodInterval)))
            .ForMember(d => d.NotifyInd, m => m.MapFrom(src => Convert.ToInt32(src.NtfyInd)))
            .ForMember(d => d.LastUpdated, m => m.MapFrom(src => NumberExtensions.DateConverter(src.UpdateOn)))
            .ForMember(d => d.UpdatedBy, m => m.MapFrom(src => src.Updateby))
            .ForMember(d => d.DefaultInd, m => m.MapFrom(src => src.DefaultInd == "Y" ? true : false))
            .ForMember(d => d.ProductItems, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.ProductItems)))
            ;
            this.CreateMap <LookupParameters, EventTypeDTO>()
            .ForMember(d => d.Scope, m => m.Ignore())
            .ForMember(d => d.EvtTypeID, m => m.MapFrom(src => NumberExtensions.ConvertLongToDb(src.EventTypeId)))
            .ForMember(d => d.EvtPlanId, m => m.MapFrom(src => NumberExtensions.ConvertLongToDb(src.EventPlanId)))
            .ForMember(d => d.ShortDescription, m => m.MapFrom(src => src.ShortDescp))
            .ForMember(d => d.ShortDescription, m => m.MapFrom(src => src.TypeDesc))
            .ForMember(d => d.Type, m => m.MapFrom(src => src.SelectedEventType))
            .ForMember(d => d.Severity, m => m.MapFrom(src => src.SelectedPriority))
            .ForMember(d => d.Scope, m => m.MapFrom(src => src.SelectedOwner))
            .ForMember(d => d.Status, m => m.MapFrom(src => src.SelectedStatus))
            .ForMember(d => d.ApplyAllInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.ApplyAllInd)))
            .ForMember(d => d.FullDescription, m => m.MapFrom(src => src.DetailedDescp))
            .ForMember(d => d.BitmapAmt, m => m.MapFrom(src => NumberExtensions.ConvertLongToDb(src.BitmapAmt)))
            .ForMember(d => d.TotalOccurs, m => m.MapFrom(src => Convert.ToInt32(src.MaxOccur)))
            .ForMember(d => d.SetFrequencyType, m => m.MapFrom(src => src.SelectedFrequency))
            .ForMember(d => d.MinIntVal, m => m.MapFrom(src => Convert.ToInt32(src.MinIntVal)))
            .ForMember(d => d.MaxIntVal, m => m.MapFrom(src => Convert.ToInt32(src.MaxIntVal)))
            .ForMember(d => d.EvtPlanDetailId, m => m.MapFrom(src => NumberExtensions.ConvertLongToDb(src.EvtPlanDetailId)))
            .ForMember(d => d.MinMoneyVal, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.MinMoneyVal)))
            .ForMember(d => d.MaxMoneyVal, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.MaxMoneyVal)))
            .ForMember(d => d.MinDateVal, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.MinDateVal)))
            .ForMember(d => d.MaxDateVal, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.MaxDateVal)))
            .ForMember(d => d.MinTimeVal, m => m.Ignore())
            .ForMember(d => d.MaxTimeVal, m => m.Ignore())
            .ForMember(d => d.PeriodInterval, m => m.MapFrom(src => Convert.ToInt32(src.PeriodInterval)))
            .ForMember(d => d.NtfyInd, m => m.MapFrom(src => NumberExtensions.ConvertLongToDb(src.NotifyInd)))
            .ForMember(d => d.UpdateOn, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.LastUpdated)))
            .ForMember(d => d.Updateby, m => m.MapFrom(src => src.UpdatedBy))
            .ForMember(d => d.DefaultInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.DefaultInd)))
            .ForMember(d => d.ProductItems, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.ProductItems)))
            ;
            this.CreateMap <RebatePlanDTO, LookupParameters>()
            .ForMember(d => d.PlanId, m => m.MapFrom(src => Convert.ToString(src.PlanId)))
            .ForMember(d => d.EffectiveFrom, m => m.MapFrom(src => NumberExtensions.DateConverter(src.EffectiveDate)))
            .ForMember(d => d.ExpiryDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.ExpiredDate)))
            .ForMember(d => d.SelectedType, m => m.MapFrom(src => Convert.ToString(src.Type)))
            .ForMember(d => d.LastUpdated, m => m.MapFrom(src => NumberExtensions.DateConverter(src.Plan_UpdateDate)))
            .ForMember(d => d.MinPurchaseAmt, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TierValue))))
            .ForMember(d => d.SubSeqPurchaseAmt, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.BasisValue))))
            .ForMember(d => d.BillingPlanLastUpdate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.PlanDetail_UpdateDate)))
            .ForMember(d => d.UserId, m => m.MapFrom(src => src.UserId))
            ;
            this.CreateMap <LookupParameters, RebatePlanDTO>()
            .ForMember(d => d.PlanId, m => m.MapFrom(src => Convert.ToInt32(src.PlanId)))
            .ForMember(d => d.EffectiveDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.EffectiveFrom)))
            .ForMember(d => d.ExpiredDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.ExpiryDate)))
            .ForMember(d => d.Type, m => m.MapFrom(src => NumberExtensions.ConvertLongToDb(src.SelectedType)))
            .ForMember(d => d.Plan_UpdateDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.LastUpdated)))
            .ForMember(d => d.TierValue, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.MinPurchaseAmt)))
            .ForMember(d => d.BasisValue, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.SubSeqPurchaseAmt)))
            .ForMember(d => d.PlanDetail_UpdateDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.BillingPlanLastUpdate)))
            .ForMember(d => d.UserId, m => m.MapFrom(src => src.UserId))
            ;
            this.CreateMap <RebatePlanDetailDTO, LookupParameters>()
            .ForMember(d => d.PlanId, m => m.MapFrom(src => Convert.ToString(src.PlanId)))
            .ForMember(d => d.type, m => m.MapFrom(src => Convert.ToString(src.Type)))
            .ForMember(d => d.EffectiveFrom, m => m.MapFrom(src => NumberExtensions.DateConverter(src.EffectiveDate)))
            .ForMember(d => d.ExpiryDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.ExpiredDate)))
            .ForMember(d => d.LastUpdated, m => m.MapFrom(src => Convert.ToString(src.PlansUpdateDate)))
            .ForMember(d => d.MinPurchaseAmt, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.MinPurchAmt))))
            .ForMember(d => d.SubSeqPurchaseAmt, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.SubseqPurchAmt))))
            .ForMember(d => d.SubSeqBillingAmt, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.SubseqBillingAmt))))
            .ForMember(d => d.BillingPlanUserId, m => m.MapFrom(src => src.BillingPlanUserId))
            .ForMember(d => d.BillingPlanLastUpdate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.BillingPlanLastUpdate)))
            ;
        }
Пример #6
0
        protected override void Configure()
        {
            this.CreateMap <CardHolderInfoDTO, CardHolderInfoModel>()
            .ForMember(d => d.CardType, m => m.Ignore())
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.PINInd, m => m.Ignore())
            .ForMember(d => d.DialogueInd, m => m.Ignore())
            .ForMember(d => d.RenewalInd, m => m.Ignore())
            .ForMember(d => d.SKDSNo, m => m.Ignore())
            .ForMember(d => d.CostCentre, m => m.Ignore())
            .ForMember(d => d.BranchCd, m => m.Ignore())
            .ForMember(d => d.DeptCd, m => m.Ignore())
            .ForMember(d => d.CardMedia, m => m.Ignore())
            .ForMember(d => d.FullName, m => m.MapFrom(src => src.DriverName))
            .ForMember(d => d.SelectedCostCentre, m => m.MapFrom(src => src.CostCentre))
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => Convert.ToString(src.AcctNo)))
            .ForMember(d => d.EmbossName, m => m.MapFrom(src => src.EmbName))
            .ForMember(d => d.SelectedCardType, m => m.MapFrom(src => src.CardType))
            .ForMember(d => d.SelectedCurrentStatus, m => m.MapFrom(src => src.Sts))
            .ForMember(d => d.SelectedReasonCode, m => m.MapFrom(src => src.ReasonCd))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => src.CreationDate.HasValue ? NumberExtensions.DateConverter(src.CreationDate) : null))
            .ForMember(d => d.MemberSince, m => m.MapFrom(src => src.MemSince))
            .ForMember(d => d.SelectedSKDSNo, m => m.MapFrom(src => src.SKDSNo))
            .ForMember(d => d.oldCardNo, m => m.MapFrom(src => Convert.ToString(src.XPreCardNo.HasValue)))
            .ForMember(d => d.XRefCardNo, m => m.MapFrom(src => Convert.ToString(src.XRefCardNo)))
            .ForMember(d => d.SelectedCardType, m => m.MapFrom(src => src.CardType))
            .ForMember(d => d.SelectedVehicleModel, m => m.MapFrom(src => src.Model))
            .ForMember(d => d.SelectedPINInd, m => m.MapFrom(src => src.PINInd))
            .ForMember(d => d.vehRegNo, m => m.MapFrom(src => src.VehRegsNo))
            .ForMember(d => d.SelectedSKDSInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.SKDSInd)))
            .ForMember(d => d.SKDSQuota, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.SKDSQuota))))
            .ForMember(d => d.DriverName, m => m.MapFrom(src => src.DriverName))
            .ForMember(d => d.BlockedDate, m => m.MapFrom(src => src.BlockedDate.HasValue ? NumberExtensions.DateConverter(src.BlockedDate) : null))
            .ForMember(d => d.TerminatedDate, m => m.MapFrom(src => src.TerminatedDate.HasValue ? NumberExtensions.DateConverter(src.TerminatedDate) : null))
            .ForMember(d => d.PVV, m => m.MapFrom(src => src.PVV))
            .ForMember(d => d.SelectedDialogueInd, m => m.MapFrom(src => src.DialogueInd))
            .ForMember(d => d.SelectedRenewalInd, m => m.MapFrom(src => src.RenewalInd))
            .ForMember(d => d.SelectedPushAlertInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.PushAlertInd)))
            .ForMember(d => d.LocInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.LocationInd)))
            .ForMember(d => d.SelectedLocCheckFlag, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.LocationCheckFlag)))
            .ForMember(d => d.MaxCountLimit, m => m.MapFrom(src => src.LocationMaxCnt))
            .ForMember(d => d.AmtLimit, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.LocationMaxAmt))))
            .ForMember(d => d.SelectedFuelCheckFlag, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.FuelCheckFlag)))
            .ForMember(d => d.FuelLitre, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.FuelLitPerKM))))
            .ForMember(d => d.PINExceedCnt, m => m.MapFrom(src => src.PINExceedCnt.HasValue ? NumberExtensions.ConvertInt(src.PINExceedCnt) : 0))
            .ForMember(d => d.SelectedAnnualFee, m => m.MapFrom(src => src.AnnlFeeCd))
            .ForMember(d => d.SelectedJonFee, m => m.MapFrom(src => src.JoiningFeeCd))
            .ForMember(d => d.SelectedProductUtilization, m => m.MapFrom(src => src.ProdGroup))
            .ForMember(d => d.OdometerIndicator, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.OdometerInd)))
            .ForMember(d => d.PrimaryCard, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.PrimaryCard)))
            .ForMember(d => d.SelectedBranchCd, m => m.MapFrom(src => src.BranchCd))
            .ForMember(d => d.SelectedDivisionCode, m => m.MapFrom(src => src.DivisionCd))
            .ForMember(d => d.SelectedDeptCd, m => m.MapFrom(src => src.DeptCd))
            .ForMember(d => d.SelectedCardMedia, m => m.MapFrom(src => src.CardMedia))
            ;

            this.CreateMap <CardHolderInfoModel, CardHolderInfoDTO>()
            .ForMember(d => d.CardType, m => m.Ignore())
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.PINInd, m => m.Ignore())
            .ForMember(d => d.DialogueInd, m => m.Ignore())
            .ForMember(d => d.RenewalInd, m => m.Ignore())
            .ForMember(d => d.SKDSNo, m => m.Ignore())
            .ForMember(d => d.BranchCd, m => m.Ignore())
            .ForMember(d => d.DeptCd, m => m.Ignore())
            .ForMember(d => d.CardMedia, m => m.Ignore())
            .ForMember(d => d.EmbName, m => m.MapFrom(src => src.EmbossName))
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => Convert.ToInt64(src.AcctNo)))
            .ForMember(d => d.Sts, m => m.MapFrom(src => src.SelectedCurrentStatus))
            .ForMember(d => d.TerminatedDate, m => m.MapFrom(src => !string.IsNullOrEmpty(src.TerminatedDate) ? NumberExtensions.ConvertDatetimeDB(src.TerminatedDate) : DateTime.MinValue))
            .ForMember(d => d.VehRegsNo, m => m.MapFrom(src => src.vehRegNo))
            .ForMember(d => d.SKDSInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.SelectedSKDSInd)))
            .ForMember(d => d.SKDSQuota, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.SKDSQuota)))
            .ForMember(d => d.SKDSNo, m => m.MapFrom(src => src.SelectedSKDSNo))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.CreationDate)))
            .ForMember(d => d.DialogueInd, m => m.MapFrom(src => src.SelectedDialogueInd))
            .ForMember(d => d.PINInd, m => m.MapFrom(src => src.SelectedPINInd))
            .ForMember(d => d.OdometerInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.OdometerIndicator)))
            .ForMember(d => d.PushAlertInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.SelectedPushAlertInd)))
            .ForMember(d => d.AnnlFeeCd, m => m.MapFrom(src => src.SelectedAnnualFee))
            .ForMember(d => d.JoiningFeeCd, m => m.MapFrom(src => src.SelectedJonFee))
            .ForMember(d => d.RenewalInd, m => m.MapFrom(src => src.SelectedRenewalInd))
            .ForMember(d => d.PrimaryCard, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.PrimaryCard)))
            .ForMember(d => d.ProdGroup, m => m.MapFrom(src => src.SelectedProductUtilization))
            .ForMember(d => d.CostCentre, m => m.MapFrom(src => src.SelectedCostCentre))
            .ForMember(d => d.Model, m => m.MapFrom(src => src.SelectedVehicleModel))
            .ForMember(d => d.BranchCd, m => m.MapFrom(src => src.SelectedBranchCd))
            .ForMember(d => d.DivisionCd, m => m.MapFrom(src => src.SelectedDivisionCode))
            .ForMember(d => d.DeptCd, m => m.MapFrom(src => src.SelectedDeptCd))
            .ForMember(d => d.BlockedDate, m => m.MapFrom(src => !string.IsNullOrEmpty(src.BlockedDate) ? NumberExtensions.ConvertDatetimeDB(src.BlockedDate) : DateTime.MinValue))
            ;

            this.CreateMap <CardHolderInfoDTO, CardFinancialInfoModel>()
            .ForMember(d => d.txnLimit, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TxnLimit))))
            .ForMember(d => d.litLimit, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.LitLimit))))
            .ForMember(d => d.PinExceedCnt, m => m.MapFrom(src => NumberExtensions.ConvertInt(src.PINExceedCnt)))
            .ForMember(d => d.PinAttempted, m => m.MapFrom(src => src.PINAttempted))
            .ForMember(d => d.PinTriedUpdDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.PinTriedUpdDate)))
            .ForMember(d => d.PushAlertInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.PushAlertInd)))
            .ForMember(d => d.LocationInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.LocationInd)))
            .ForMember(d => d.LocationCheckFlag, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.LocationCheckFlag)))
            .ForMember(d => d.LocationMaxAmt, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.LocationMaxAmt))))
            .ForMember(d => d.FuelCheckFlag, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.FuelCheckFlag)))
            .ForMember(d => d.FuelLitPerKM, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.FuelLitPerKM))))
            ;

            this.CreateMap <CardFinancialInfoModel, CardHolderInfoDTO>()
            .ForMember(d => d.TxnLimit, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.txnLimit)))
            .ForMember(d => d.LitLimit, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.litLimit)))
            .ForMember(d => d.PINExceedCnt, m => m.MapFrom(src => src.PinExceedCnt))
            .ForMember(d => d.PINAttempted, m => m.MapFrom(src => src.PinAttempted))
            .ForMember(d => d.PinTriedUpdDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.PinTriedUpdDate)))
            .ForMember(d => d.PushAlertInd, m => m.MapFrom(src => src.PushAlertInd == true ? "Y" : "N"))
            .ForMember(d => d.LocationInd, m => m.MapFrom(src => src.LocationInd == true ? "Y" : "N"))
            .ForMember(d => d.LocationCheckFlag, m => m.MapFrom(src => src.LocationCheckFlag == true ? "Y" : "N"))
            .ForMember(d => d.LocationMaxAmt, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.LocationMaxAmt)))
            .ForMember(d => d.FuelCheckFlag, m => m.MapFrom(src => src.FuelCheckFlag == true ? "Y" : "N"))
            .ForMember(d => d.FuelLitPerKM, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.FuelLitPerKM)))
            ;
            this.CreateMap <PersonalInfoDTO, PersonInfoModel>()
            .ForMember(d => d.SelectedTitle, m => m.MapFrom(src => src.Title))
            .ForMember(d => d.IdNo, m => m.MapFrom(src => src.NewIc))
            .ForMember(d => d.SelectedIdType, m => m.MapFrom(src => src.NewIcType))
            .ForMember(d => d.AltIdNo, m => m.MapFrom(src => src.AlternateIc))
            .ForMember(d => d.SelectedAltIdType, m => m.MapFrom(src => src.AlternateIcType))
            .ForMember(d => d.Selectedgender, m => m.MapFrom(src => src.Gender))
            .ForMember(d => d.DOB, m => m.MapFrom(src => NumberExtensions.DateConverter(src.DOB)))
            .ForMember(d => d.AnnualIncome, m => m.MapFrom(src => NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.Income))))
            .ForMember(d => d.SelectedOccupation, m => m.MapFrom(src => src.Occupation))
            .ForMember(d => d.SelectedDeptId, m => m.MapFrom(src => src.DeptId))
            .ForMember(d => d.DrivingLicense, m => m.MapFrom(src => src.DrivingLic))
            ;
            this.CreateMap <PersonInfoModel, PersonalInfoDTO>()
            .ForMember(d => d.Title, m => m.Ignore())
            .ForMember(d => d.Gender, m => m.Ignore())
            .ForMember(d => d.Occupation, m => m.Ignore())
            .ForMember(d => d.DeptId, m => m.Ignore())
            .ForMember(d => d.Title, m => m.MapFrom(src => src.SelectedTitle))
            .ForMember(d => d.NewIc, m => m.MapFrom(src => src.IdNo))
            .ForMember(d => d.NewIcType, m => m.MapFrom(src => src.SelectedIdType))
            .ForMember(d => d.OldIc, m => m.MapFrom(src => src.AltIdNo))
            .ForMember(d => d.OldIcType, m => m.MapFrom(src => src.SelectedAltIdType))
            .ForMember(d => d.Gender, m => m.MapFrom(src => src.Selectedgender))
            .ForMember(d => d.DOB, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.DOB)))
            .ForMember(d => d.IncomeBK, m => m.MapFrom(src => src.AnnualIncome))
            .ForMember(d => d.Occupation, m => m.MapFrom(src => src.SelectedOccupation))
            .ForMember(d => d.DeptId, m => m.MapFrom(src => src.SelectedDeptId))
            .ForMember(d => d.DrivingLic, m => m.MapFrom(src => src.DrivingLicense))
            ;
            this.CreateMap <ChangeStatusDTO, ChangeStatus>()
            .ForMember(d => d.SelectedCurrentStatus, m => m.MapFrom(src => src.Sts))
            .ForMember(d => d.SelectedRefType, m => m.MapFrom(src => src.EventType))
            .ForMember(d => d.SelectedReasonCode, m => m.MapFrom(src => src.ReasonCd))
            .ForMember(d => d.CurrentStatus, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.CurrentStatus)))
            .ForMember(d => d.RefType, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.RefType)))
            .ForMember(d => d.ReasonCode, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.ReasonCode)))
            .ForMember(d => d.ChangeStatusTo, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.ChangeStatusTo)))
            ;
            this.CreateMap <ChangeStatus, ChangeStatusDTO>()
            .ForMember(d => d.Sts, m => m.MapFrom(src => src.SelectedChangeStatusTo))
            .ForMember(d => d.EventType, m => m.MapFrom(src => src.SelectedRefType))
            .ForMember(d => d.ReasonCd, m => m.MapFrom(src => src.SelectedReasonCode))
            .ForMember(d => d.CardNo, m => m.MapFrom(src => src._CardnAccNo.CardNo))
            .ForMember(d => d.MerchAcctNo, m => m.MapFrom(src => src.MerchAcctNo))
            .ForMember(d => d.BusnLocation, m => m.MapFrom(src => src.BusnLocation))
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => src._CardnAccNo.AccNo))
            .ForMember(d => d.CurrentStatus, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.CurrentStatus)))
            .ForMember(d => d.RefType, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.RefType)))
            .ForMember(d => d.ReasonCode, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.ReasonCode)))
            .ForMember(d => d.ChangeStatusTo, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.ChangeStatusTo)))
            ;
            this.CreateMap <CardReplacementDTO, CardReplacement>()
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.FeeCd, m => m.Ignore())
            .ForMember(d => d.CardMedia, m => m.Ignore())
            .ForMember(d => d.NewCardNo, m => m.MapFrom(src => src.NewCardNo.HasValue ? Convert.ToString(src.NewCardNo) : ""))
            .ForMember(d => d.XReferenceNo, m => m.MapFrom(src => Convert.ToString(src.PrevCardNo)))
            .ForMember(d => d.ExpiryDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.CardExpiry)))
            .ForMember(d => d.TerminatedDate, m => m.MapFrom(src => src.TerminatedDate.HasValue ? NumberExtensions.DateConverter(src.TerminatedDate) : ""))
            .ForMember(d => d.SelectedCurrentStatus, m => m.MapFrom(src => src.Sts))
            .ForMember(d => d.SelectedFeeCd, m => m.MapFrom(src => src.FeeCd))
            .ForMember(d => d.SelectedReasonCode, m => m.MapFrom(src => src.ReasonCd))
            .ForMember(d => d.SelectedCardMediaType, m => m.MapFrom(src => src.CardMedia.HasValue ? Convert.ToString(src.CardMedia) : ""))
            ;
            this.CreateMap <CardReplacement, CardReplacementDTO>()
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.FeeCd, m => m.Ignore())
            .ForMember(d => d.CardMedia, m => m.Ignore())
            .ForMember(d => d.PrevCardNo, m => m.MapFrom(src => Convert.ToInt64(src.CardNo)))
            .ForMember(d => d.CardExpiry, m => m.MapFrom(src => !string.IsNullOrEmpty(src.ExpiryDate) ? NumberExtensions.ConvertDatetimeDB(src.ExpiryDate) : DateTime.MinValue))
            .ForMember(d => d.TerminatedDate, m => m.MapFrom(src => string.IsNullOrEmpty(src.TerminatedDate) ? NumberExtensions.ConvertDatetimeDB(src.TerminatedDate) : DateTime.MinValue))
            .ForMember(d => d.CardMedia, m => m.MapFrom(src => src.SelectedCardMediaType))
            .ForMember(d => d.FeeCd, m => m.MapFrom(src => Convert.ToInt32(src.SelectedFeeCd)))
            .ForMember(d => d.RsCode, m => m.MapFrom(src => src.SelectedReasonCode))
            ;
            this.CreateMap <LocationAcceptDTO, LocationAcceptListModel>()
            .ForMember(d => d.SelectedStates, m => m.Ignore())
            .ForMember(d => d._CardnAccNo, m => m.Ignore())
            .ForMember(d => d.DBAName, m => m.MapFrom(src => src.DBA_Name))
            .ForMember(d => d.s_state, m => m.MapFrom(src => src.DBA_City))
            .ForMember(d => d.UserId, m => m.MapFrom(src => src.UserId))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => src.CreationDate))
            .ForMember(d => d.SiteId, m => m.MapFrom(src => src.SiteId))
            .ForMember(d => d.BusnLoc, m => m.MapFrom(src => src.MerchantId))
            .ForMember(d => d.SelectedStates, m => m.MapFrom(s => CustomMapperExtensions.MapIEnumerableToList(s.SelectedStates)))
            .ForMember(d => d.SelectedBusnLocations, m => m.MapFrom(s => CustomMapperExtensions.MapIEnumerableToList(s.SelectedBusnLocations)))
            ;
            this.CreateMap <LocationAcceptListModel, LocationAcceptDTO>()
            .ForMember(d => d.SelectedStates, m => m.Ignore())
            .ForMember(d => d.DBA_Name, m => m.MapFrom(src => src.DBAName))
            .ForMember(d => d.DBA_City, m => m.MapFrom(src => src.s_state))
            .ForMember(d => d.UserId, m => m.MapFrom(src => src.UserId))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => src.CreationDate))
            .ForMember(d => d.SiteId, m => m.MapFrom(src => src.SiteId))
            .ForMember(d => d.MerchantId, m => m.MapFrom(src => src.BusnLoc))
            .ForMember(d => d.SelectedStates, m => m.MapFrom(s => CustomMapperExtensions.MapIEnumerableToList(s.SelectedStates)))
            .ForMember(d => d.SelectedBusnLocations, m => m.MapFrom(s => CustomMapperExtensions.MapIEnumerableToList(s.SelectedBusnLocations)))
            ;
            this.CreateMap <CardListDTO, CardHolderInfoModel>()
            .ForMember(d => d.CardType, m => m.Ignore())
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.PINInd, m => m.Ignore())
            .ForMember(d => d.DialogueInd, m => m.Ignore())
            .ForMember(d => d.RenewalInd, m => m.Ignore())
            .ForMember(d => d.SKDSNo, m => m.Ignore())
            .ForMember(d => d.CostCentre, m => m.Ignore())
            .ForMember(d => d.BranchCd, m => m.Ignore())
            .ForMember(d => d.DeptCd, m => m.Ignore())
            .ForMember(d => d.CardMedia, m => m.Ignore())
            .ForMember(d => d.EmbossName, m => m.MapFrom(src => src.EmbName))
            .ForMember(d => d.SelectedCurrentStatus, m => m.MapFrom(src => src.Sts))
            .ForMember(d => d.XRefCardNo, m => m.MapFrom(src => Convert.ToInt64(src.XrefCardNo)))
            .ForMember(d => d.SelectedCardType, m => m.MapFrom(src => src.CardType))
            .ForMember(d => d.SelectedPINInd, m => m.MapFrom(src => src.PINInd))
            .ForMember(d => d.vehRegNo, m => m.MapFrom(src => src.VehRegsNo))
            .ForMember(d => d.SKDSQuota, m => m.MapFrom(src => src.SKDSQuota))
            .ForMember(d => d.SelectedSKDSNo, m => m.MapFrom(src => src.SKDSNo))
            .ForMember(d => d.BlockedDate, m => m.MapFrom(src => NumberExtensions.DateTimeConverter(src.BlockedDate)))
            .ForMember(d => d.DriverCd, m => m.MapFrom(src => src.DriverName))
            .ForMember(d => d.TerminatedDate, m => m.MapFrom(src => src.TerminatedDate.HasValue ? NumberExtensions.DateTimeConverter(src.TerminatedDate):""))
            .ForMember(d => d.SelectedCostCentre, m => m.MapFrom(src => src.CostCenter))
            ;
        }
        public async Task <IssMessageDTO> SaveMerchantMultiTxnAdjustmentMaint(TxnAdjustmentDTO adjustmentDetail, string userId)
        {
            using (var cardtrendentities = new pdb_ccmsContext(_connectionString))
            {
                IssMessageDTO issMessage = new IssMessageDTO();
                DataTable     dt         = new DataTable();
                dt.Columns.Add("Acctno", typeof(long));
                dt.Columns.Add("Cardno");
                dt.Columns.Add("TxnAmt", typeof(decimal));
                dt.Columns.Add("Descp");
                dt.Columns.Add("InvoiceNo");
                dt.Columns.Add("AppvCd");
                dt.Columns.Add("DeftBusnlocation");
                dt.Columns.Add("DeftTermId");
                dt.Columns.Add("Owner");
                dt.Columns.Add("Sts");
                dt.Columns.Add("TxnDate");
                dt.Columns.Add("DueDate");
                dt.Columns.Add("TxnCd");
                dt.Columns.Add("TxnId");
                foreach (var item in adjustmentDetail.multipleTxnRecord)
                {
                    DataRow dr = dt.NewRow();
                    dr["DeftBusnlocation"] = item.MerchantAcctNo;
                    dr["TxnAmt"]           = (object)NumberExtensions.ConvertDecimalToDb(item.TxnAmt) ?? DBNull.Value;
                    dr["Descp"]            = (object)item.Descp ?? DBNull.Value;
                    dr["TxnCd"]            = adjustmentDetail.TxnCd;
                    dr["TxnDate"]          = adjustmentDetail.TxnDate.ToShortDateString();
                    dr["DueDate"]          = adjustmentDetail.DueDate == DateTime.MinValue ? DBNull.Value : NumberExtensions.ConvertDatetimeDB(adjustmentDetail.DueDate.ToShortDateString());
                    dr["Owner"]            = adjustmentDetail.Owner;
                    dr["InvoiceNo"]        = (object)adjustmentDetail.InvoiceNo ?? DBNull.Value;
                    dr["TxnId"]            = (object)adjustmentDetail.TxnId ?? DBNull.Value;
                    dt.Rows.Add(dr);
                }

                var parameters = new[] {
                    new SqlParameter("@IssNo", SqlDbType.SmallInt)
                    {
                        SqlValue = Common.Helpers.Common.GetIssueNo()
                    },
                    new SqlParameter("@CheqAmt", SqlDbType.Money)
                    {
                        SqlValue = NumberExtensions.ConvertDecimalToDb(adjustmentDetail.ChequeAmt)
                    },
                    new SqlParameter("@UserId", SqlDbType.VarChar)
                    {
                        SqlValue = (object)userId ?? DBNull.Value
                    },
                    new SqlParameter("@Adjustment", SqlDbType.Structured)
                    {
                        SqlValue = dt, TypeName = "Adjustment"
                    },
                    new SqlParameter("@RetCd", SqlDbType.Int)
                    {
                        Direction = ParameterDirection.Output
                    },
                    new SqlParameter("@RcptNo", SqlDbType.VarChar)
                    {
                        SqlValue = (object)adjustmentDetail.InvoiceNo ?? DBNull.Value
                    },
                    new SqlParameter("@BatchId", SqlDbType.Int)
                    {
                        SqlValue = (object)adjustmentDetail.BatchId ?? DBNull.Value
                    },
                    new SqlParameter("@BatchOut", SqlDbType.VarChar, 25)
                    {
                        Direction = ParameterDirection.Output
                    },
                    new SqlParameter("@Owner", SqlDbType.VarChar)
                    {
                        SqlValue = (object)adjustmentDetail.Owner ?? DBNull.Value
                    },
                    new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt)
                    {
                        Direction = ParameterDirection.Output
                    }
                };

                await cardtrendentities.Database.ExecuteSqlCommandAsync("exec @RETURN_VALUE = WebMerchantMultiTxnAdjustmentMaint @IssNo,@CheqAmt,@UserId,@Adjustment,@RetCd OUT," +
                                                                        "@RcptNo,@BatchId,@BatchOut OUT,@Owner", parameters);

                var             resultCode = parameters.Where(x => x.ParameterName == "@RETURN_VALUE").FirstOrDefault().Value;
                ResourceManager myManager  = new ResourceManager(typeof(CardTrend.Common.Resources.IssMessages));
                issMessage.paraOut.BatchId = parameters.Where(x => x.ParameterName == "@BatchOut").FirstOrDefault().Value.ToString();
                issMessage.paraOut.RetCd   = parameters.Where(x => x.ParameterName == "@RetCd").FirstOrDefault().Value.ToString();
                issMessage.Descp           = myManager.GetString("Msg" + resultCode);
                issMessage.Flag            = Convert.ToInt32(resultCode);
                return(issMessage);
            }
        }
Пример #8
0
        public async Task <IssMessageDTO> SaveWebNtfyEvtConfMaint(NtfyEventConfDTO lookUpParameters)
        {
            using (var cardtrendentities = new pdb_ccmsContext(_connectionString))
            {
                IssMessageDTO issMessage         = new IssMessageDTO();
                var           dtNtfyEventTbl     = new DataTable();
                var           dtNtfyEventRcptTbl = new DataTable();
                dtNtfyEventTbl.Columns.Add("EvtNtfyDetailId");
                dtNtfyEventTbl.Columns.Add("MinIntVal");
                dtNtfyEventTbl.Columns.Add("MaxIntVal");
                dtNtfyEventTbl.Columns.Add("MinMoneyVal");
                dtNtfyEventTbl.Columns.Add("MaxMoneyVal");
                dtNtfyEventTbl.Columns.Add("MinDateVal");
                dtNtfyEventTbl.Columns.Add("MaxDateVal");
                dtNtfyEventTbl.Columns.Add("MinTimeVal");
                dtNtfyEventTbl.Columns.Add("MaxTimeVal");
                dtNtfyEventTbl.Columns.Add("VarCharVal");
                dtNtfyEventTbl.Columns.Add("PeriodType");
                dtNtfyEventTbl.Columns.Add("PeriodInterval");
                if (lookUpParameters.ProductItems != null)
                {
                    foreach (var item in lookUpParameters.ProductItems)
                    {
                        DataRow dr = dtNtfyEventTbl.NewRow();
                        dr["EvtNtfyDetailId"] = item.EvtPlanDetailId;
                        dr["MinIntVal"]       = NumberExtensions.ConvertLongToDb(item.MinIntVal);
                        dr["MaxIntVal"]       = NumberExtensions.ConvertLongToDb(item.MaxIntVal);
                        dr["MinMoneyVal"]     = NumberExtensions.ConvertDecimalToDb(item.MinMoneyVal);
                        dr["MaxMoneyVal"]     = NumberExtensions.ConvertDecimalToDb(item.MaxMoneyVal);
                        dr["MinDateVal"]      = NumberExtensions.ConvertDatetimeDB(item.MinDateVal);
                        dr["MaxDateVal"]      = NumberExtensions.ConvertDatetimeDB(item.MaxDateVal);
                        dr["MinTimeVal"]      = item.MinTimeVal;
                        dr["MaxTimeVal"]      = item.MaxTimeVal;
                        dr["VarCharVal"]      = item.VarCharVal;
                        dr["PeriodType"]      = item.PeriodType;
                        dr["PeriodInterval"]  = item.PeriodInterval;
                        dtNtfyEventTbl.Rows.Add(dr);
                    }
                }
                dtNtfyEventRcptTbl.Columns.Add("EventRecipientId");
                dtNtfyEventRcptTbl.Columns.Add("EventScheduleId");
                dtNtfyEventRcptTbl.Columns.Add("ContactName");
                dtNtfyEventRcptTbl.Columns.Add("ContactNo");
                dtNtfyEventRcptTbl.Columns.Add("ChannelInd");
                dtNtfyEventRcptTbl.Columns.Add("LangInd");

                if (lookUpParameters.eventRcpts != null)
                {
                    foreach (var item in lookUpParameters.eventRcpts)
                    {
                        DataRow dr = dtNtfyEventRcptTbl.NewRow();
                        dr["EventRecipientId"] = string.IsNullOrEmpty(item.Id.ToString()) ? (object)DBNull.Value : item.Id;
                        dr["EventScheduleId"]  = string.IsNullOrEmpty(lookUpParameters.EventScheduleId.ToString()) ? (object)DBNull.Value : lookUpParameters.EventScheduleId;
                        dr["ContactName"]      = string.IsNullOrEmpty(item.ContactName) ? (object)DBNull.Value : item.ContactName;
                        dr["ContactNo"]        = string.IsNullOrEmpty(item.ContactNo) ? (object)DBNull.Value : item.ContactNo;
                        dr["ChannelInd"]       = item.ChannelInd;
                        dr["LangInd"]          = string.IsNullOrEmpty(item.LangInd) ? (object)DBNull.Value : item.LangInd;
                        dtNtfyEventRcptTbl.Rows.Add(dr);
                    }
                }

                var parameters = new[] {
                    new SqlParameter("@IssNo", SqlDbType.SmallInt)
                    {
                        SqlValue = Common.Helpers.Common.GetIssueNo()
                    },
                    new SqlParameter("@EventSchId", SqlDbType.BigInt)
                    {
                        SqlValue = (object)lookUpParameters.EventScheduleId ?? DBNull.Value
                    },
                    new SqlParameter("@NewEventSchId", SqlDbType.BigInt)
                    {
                        Direction = ParameterDirection.Output
                    },
                    new SqlParameter("@EventTypeID", SqlDbType.BigInt)
                    {
                        SqlValue = (object)lookUpParameters.EventTypeId ?? DBNull.Value
                    },
                    new SqlParameter("@EventPlanId", SqlDbType.BigInt)
                    {
                        SqlValue = (object)lookUpParameters.EventPlanId ?? DBNull.Value
                    },
                    new SqlParameter("@ShortDescp", SqlDbType.NVarChar)
                    {
                        SqlValue = (object)lookUpParameters.ShortDescp ?? DBNull.Value
                    },
                    new SqlParameter("@Scope", SqlDbType.VarChar)
                    {
                        SqlValue = (object)lookUpParameters.OwnerType ?? DBNull.Value
                    },
                    new SqlParameter("@Sts", SqlDbType.VarChar)
                    {
                        SqlValue = (object)lookUpParameters.Sts ?? DBNull.Value
                    },
                    new SqlParameter("@ParamInd", SqlDbType.BigInt)
                    {
                        SqlValue = 0
                    },
                    new SqlParameter("@RefTo", SqlDbType.VarChar)
                    {
                        SqlValue = (object)lookUpParameters.Refto ?? DBNull.Value
                    },
                    new SqlParameter("@RefKey", SqlDbType.VarChar)
                    {
                        SqlValue = (object)lookUpParameters.Refkey ?? DBNull.Value
                    },

                    new SqlParameter("@CntEvtOccur", SqlDbType.Int)
                    {
                        SqlValue = (object)lookUpParameters.MaxOccur ?? DBNull.Value
                    },
                    new SqlParameter("@EvtOccurType", SqlDbType.VarChar)
                    {
                        SqlValue = (object)lookUpParameters.Frequency ?? DBNull.Value
                    },
                    new SqlParameter("@UserId", SqlDbType.VarChar)
                    {
                        SqlValue = (object)lookUpParameters.UserId ?? DBNull.Value
                    },
                    new SqlParameter("@ChannelInd", SqlDbType.BigInt)
                    {
                        SqlValue = (object)lookUpParameters.EvtTypeChannelInd ?? DBNull.Value
                    },
                    new SqlParameter("@DefaultInd", SqlDbType.Char)
                    {
                        SqlValue = (object)lookUpParameters.DefaultInd ?? DBNull.Value
                    },
                    new SqlParameter("@NtfyEventTbl", SqlDbType.Structured)
                    {
                        SqlValue = dtNtfyEventTbl, TypeName = "NtfyEventTbl"
                    },
                    new SqlParameter("@NtfyEventRcptTbl", SqlDbType.Structured)
                    {
                        SqlValue = dtNtfyEventRcptTbl, TypeName = "NtfyEventRcptTbl"
                    },
                    new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt)
                    {
                        Direction = ParameterDirection.Output
                    }
                };

                await cardtrendentities.Database.ExecuteSqlCommandAsync("exec @RETURN_VALUE = WebNtfyEvtConfMaint @IssNo,@EventSchId,@NewEventSchId OUT,@EventTypeID,@EventPlanId," +
                                                                        "@ShortDescp,@Scope,@Sts,@ParamInd,@RefTo,@RefKey,@CntEvtOccur,@EvtOccurType,@UserId,@ChannelInd,@DefaultInd,@NtfyEventTbl,@NtfyEventRcptTbl", parameters);

                var resultCode    = parameters.Where(x => x.ParameterName == "@RETURN_VALUE").FirstOrDefault().Value;
                var newEventSchId = parameters.Where(x => x.ParameterName == "@NewEventSchId").FirstOrDefault().Value;
                issMessage.Flag = Convert.ToInt32(resultCode);
                issMessage.paraOut.NewEventSchId = Convert.ToInt64(newEventSchId);
                return(issMessage);
            }
        }
Пример #9
0
        protected override void Configure()
        {
            this.CreateMap <CreditAssesOperationDTO, CreditAssesOperation>()
            .ForMember(d => d.DirectDebitInd, m => m.Ignore())
            .ForMember(d => d.BankAcctType, m => m.Ignore())
            .ForMember(d => d.BankName, m => m.Ignore())
            .ForMember(d => d.DepositType, m => m.Ignore())
            .ForMember(d => d.SelectedDirectDebitInd, m => m.MapFrom(src => src.DirectDebitInd))
            .ForMember(d => d.SelectedDepositType, m => m.MapFrom(src => src.DepositType))
            .ForMember(d => d.SelectedBankAcctType, m => m.MapFrom(src => src.BankAcctType != null ? src.BankAcctType : ""))
            .ForMember(d => d.SelectedBankName, m => m.MapFrom(src => src.BankName != null ? src.BankName : ""))
            .ForMember(d => d.BankAcctNo, m => m.MapFrom(src => src.BankAcctNo != null ? src.BankAcctNo : ""))
            .ForMember(d => d.DepositAmt, m => m.MapFrom(src => src.DepositAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.DepositAmt)) : ""))
            .ForMember(d => d.Txnid, m => m.MapFrom(src => src.TxnId))
            .ForMember(d => d.UserId, m => m.MapFrom(src => src.UserId))
            .ForMember(d => d.Creationdt, m => m.MapFrom(src => src.CreationDate.ToString()))
            .ForMember(d => d.BgSerialNo, m => m.MapFrom(src => src.BGSerialNo != null ? src.BGSerialNo : ""))
            .ForMember(d => d.SecurityAmt, m => m.MapFrom(src => src.SecurityDeposit.HasValue ? NumberExtensions.ConverterDecimal(src.SecurityDeposit.Value.ToString()).ToString() : ""))
            .ForMember(d => d.SAPRefNo, m => m.MapFrom(src => src.SAPRefNo != null ? src.SAPRefNo : ""))
            ;
            this.CreateMap <CreditAssesOperation, CreditAssesOperationDTO>()
            .ForMember(d => d.DirectDebitInd, m => m.Ignore())
            .ForMember(d => d.BankAcctType, m => m.Ignore())
            .ForMember(d => d.BankName, m => m.Ignore())
            .ForMember(d => d.CorpCd, m => m.Ignore())
            .ForMember(d => d.DepositType, m => m.Ignore())
            .ForMember(d => d.DepositFromDate, m => m.Ignore())
            .ForMember(d => d.DepositToDate, m => m.Ignore())
            .ForMember(d => d.EffToDate, m => m.Ignore())
            .ForMember(d => d.EffFromDate, m => m.Ignore())
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => src.acctNo))
            .ForMember(d => d.TxnId, m => m.MapFrom(src => src.Txnid))
            .ForMember(d => d.DepositInd, m => m.MapFrom(src => src.DirectDebitInd == true ? "Y" : "N"))
            .ForMember(d => d.DepositType, m => m.MapFrom(src => src.SelectedDepositType))
            .ForMember(d => d.ValidityDate, m => m.MapFrom(src => DateTime.ParseExact(src.ValidityDate, "dd/MM/yyyy", null)))
            .ForMember(d => d.BankAcctType, m => m.MapFrom(src => src.SelectedBankAcctType))
            .ForMember(d => d.BankName, m => m.MapFrom(src => src.SelectedBankName))
            .ForMember(d => d.DepositAmt, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.DepositAmt)))
            .ForMember(d => d.BGSerialNo, m => m.MapFrom(src => src.BankBranchCode))
            .ForMember(d => d.EffFromDate, m => m.MapFrom(src => DateTime.ParseExact(src.DepositFromDate, "dd/MM/yyyy", null)))
            .ForMember(d => d.EffToDate, m => m.MapFrom(src => DateTime.ParseExact(src.DepositToDate, "dd/MM/yyyy", null)))
            .ForMember(d => d.BGSerialNo, m => m.MapFrom(src => src.BankBranchCode))
            .ForMember(d => d.NIRD, m => m.MapFrom(src => DateTime.ParseExact(src.NRID, "dd/MM/yyyy", null)))
            .ForMember(d => d.Remark, m => m.MapFrom(src => src.remarks))
            .ForMember(d => d.SecurityDeposit, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.SecurityAmt)))
            ;
            this.CreateMap <GeneralInfoDTO, GeneralInfoModel>()
            .ForMember(d => d.PlasticType, m => m.Ignore())
            .ForMember(d => d.SIC, m => m.Ignore())
            .ForMember(d => d.CustomerGroup, m => m.Ignore())
            .ForMember(d => d.BusnEstablishment, m => m.Ignore())
            .ForMember(d => d.AccountType, m => m.Ignore())
            .ForMember(d => d.LangId, m => m.Ignore())
            .ForMember(d => d.TradingArea, m => m.Ignore())
            .ForMember(d => d.SelectedAccountType, m => m.MapFrom(src => src.AccountType))
            .ForMember(d => d.SelectedPlasticType, m => m.MapFrom(src => src.PlasticType))
            .ForMember(d => d.AccountName, m => m.MapFrom(src => src.AccountName))
            .ForMember(d => d.SelectedCompanyType, m => m.MapFrom(src => src.CmpyType))
            .ForMember(d => d.RegsDate, m => m.MapFrom(src => src.RegsDate.HasValue ? NumberExtensions.DateConverter(src.RegsDate) :""))
            .ForMember(d => d.SelectedSIC, m => m.MapFrom(src => src.SIC))
            .ForMember(d => d.SapNo, m => m.MapFrom(src => src.CustomerNo))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateTimeConverter(src.CreationDate)))
            .ForMember(d => d.BlockedDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.BlockedDate)))
            .ForMember(d => d.SelectedCorpName, m => m.MapFrom(src => src.CorpCd))
            .ForMember(d => d.SelectedClientClass, m => m.MapFrom(src => src.TermsofPayment))
            .ForMember(d => d.selectedClientType, m => m.MapFrom(src => src.CustomerGroup))
            .ForMember(d => d.SelectedBusnEstablishment, m => m.MapFrom(src => src.BusnEstablishment))
            .ForMember(d => d.SourceCode, m => m.MapFrom(src => src.SrcCd))
            .ForMember(d => d.SourceRefNo, m => m.MapFrom(src => src.SrcRefNo))
            .ForMember(d => d.SelectedAcctSts, m => m.MapFrom(src => src.Sts))
            .ForMember(d => d.TerminatedDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.TerminatedDate)))
            .ForMember(d => d.SelectedReasonCode, m => m.MapFrom(src => src.ReasonCd))
            .ForMember(d => d.OvrStatusTaggedByUserId, m => m.MapFrom(src => src.OverrideStsUserId))
            .ForMember(d => d.SelectedOvrStatus, m => m.MapFrom(src => src.OverrideSts))
            .ForMember(d => d.OvrExpDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.OverrideStsExpiry)))
            .ForMember(d => d.OvrStartDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.OverrideStsStart)))
            .ForMember(d => d.ApplId, m => m.MapFrom(src => src.ApplId.HasValue? Convert.ToString(src.ApplId) : null))
            .ForMember(d => d.CaptDate, m => m.MapFrom(src => src.CreationDate.HasValue ? NumberExtensions.DateTimeConverter(src.CaptDate) : ""))
            .ForMember(d => d.LoyaltyCardNo, m => m.MapFrom(src => src.LoyaltyCardNo.HasValue? Convert.ToString(src.LoyaltyCardNo) : null))
            .ForMember(d => d.SelectedBusnCategory, m => m.MapFrom(src => src.Industry))
            .ForMember(d => d.SelectedSaleTerritory, m => m.MapFrom(src => src.SalesGroup))
            .ForMember(d => d.SelectedPaymentTerm, m => m.MapFrom(src => src.PymtTerms.HasValue ?  Convert.ToString(src.PymtTerms) : null))
            .ForMember(d => d.ApplCreationDate, m => m.MapFrom(src => NumberExtensions.DateTimeConverter(src.CaptDate)))
            .ForMember(d => d.CutOff, m => m.MapFrom(src => Convert.ToString(src.CutOff)))
            .ForMember(d => d.SelectedCurrentStatus, m => m.MapFrom(src => src.Sts))
            .ForMember(d => d.SelectedLangId, m => m.MapFrom(src => src.LangId))
            .ForMember(d => d.CompanyEmbName, m => m.MapFrom(src => src.CmpyEmbName))
            .ForMember(d => d.ContactPerson, m => m.MapFrom(src => src.FamilyName))
            .ForMember(d => d.AuthSignatory, m => m.MapFrom(src => src.AuthName))
            .ForMember(d => d.SelectedTradingArea, m => m.MapFrom(src => src.TradingArea))
            ;
            this.CreateMap <GeneralInfoModel, GeneralInfoDTO>()
            .ForMember(d => d.PlasticType, m => m.Ignore())
            .ForMember(d => d.SIC, m => m.Ignore())
            .ForMember(d => d.CustomerGroup, m => m.Ignore())
            .ForMember(d => d.BusnEstablishment, m => m.Ignore())
            .ForMember(d => d.AccountType, m => m.Ignore())
            .ForMember(d => d.LangId, m => m.Ignore())
            .ForMember(d => d.TradingArea, m => m.Ignore())
            .ForMember(d => d.CreationDate, m => m.Ignore())
            .ForMember(d => d.SIC, m => m.MapFrom(src => src.SelectedSIC))
            .ForMember(d => d.CustomerNo, m => m.MapFrom(src => src.SapNo))
            .ForMember(d => d.RegsDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.RegsDate)))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.ConvertToDatetimeDB2(src.CreationDate)))
            .ForMember(d => d.BlockedDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.BlockedDate)))
            .ForMember(d => d.CorpCd, m => m.MapFrom(src => src.SelectedCorpName))
            .ForMember(d => d.TermsofPayment, m => m.MapFrom(src => src.SelectedClientClass))
            .ForMember(d => d.CustomerGroup, m => m.MapFrom(src => src.selectedClientType))
            .ForMember(d => d.BusnEstablishment, m => m.MapFrom(src => src.SelectedBusnEstablishment))
            .ForMember(d => d.SrcCd, m => m.MapFrom(src => src.SourceCode))
            .ForMember(d => d.SrcRefNo, m => m.MapFrom(src => src.SourceRefNo))
            .ForMember(d => d.Sts, m => m.MapFrom(src => src.SelectedAcctSts))
            .ForMember(d => d.TerminatedDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.TerminatedDate)))
            .ForMember(d => d.ReasonCd, m => m.MapFrom(src => src.SelectedReasonCode))
            .ForMember(d => d.OverrideStsUserId, m => m.MapFrom(src => src.OvrStatusTaggedByUserId))
            .ForMember(d => d.OverrideSts, m => m.MapFrom(src => src.SelectedOvrStatus))
            .ForMember(d => d.OverrideStsExpiry, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.OvrExpDate)))
            .ForMember(d => d.ApplId, m => m.MapFrom(src => Convert.ToInt32(src.ApplId)))
            .ForMember(d => d.CaptDate, m => m.MapFrom(src => NumberExtensions.ConvertToDatetimeDB2(src.ApplCreationDate)))
            .ForMember(d => d.LoyaltyCardNo, m => m.MapFrom(src => Convert.ToInt64(src.LoyaltyCardNo)))
            .ForMember(d => d.Industry, m => m.MapFrom(src => src.SelectedBusnCategory))
            .ForMember(d => d.SalesGroup, m => m.MapFrom(src => src.SelectedSaleTerritory))
            .ForMember(d => d.AccountType, m => m.MapFrom(src => src.SelectedAccountType))
            .ForMember(d => d.CutOff, m => m.MapFrom(src => Convert.ToByte(src.CutOff)))
            .ForMember(d => d.PymtTerms, m => m.MapFrom(src => Convert.ToInt32(src.SelectedPaymentTerm)))
            .ForMember(d => d.ReconAcct, m => m.MapFrom(src => src.CustSvcId))
            .ForMember(d => d.OverrideStsStart, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.OvrStartDate)))
            .ForMember(d => d.LangId, m => m.MapFrom(src => src.SelectedLangId))
            .ForMember(d => d.CmpyEmbName, m => m.MapFrom(src => src.CompanyEmbName))
            .ForMember(d => d.CmpyType, m => m.MapFrom(src => src.SelectedCompanyType))
            .ForMember(d => d.FamilyName, m => m.MapFrom(src => src.ContactPerson))
            .ForMember(d => d.AuthName, m => m.MapFrom(src => src.AuthSignatory))
            .ForMember(d => d.TradingArea, m => m.MapFrom(src => src.SelectedTradingArea))
            .ForMember(d => d.PlasticType, m => m.MapFrom(src => src.SelectedPlasticType))
            ;

            this.CreateMap <FinancialInfoDTO, FinancialInfoModel>()
            .ForMember(d => d.TaxCategory, m => m.Ignore())
            .ForMember(d => d.CycNo, m => m.Ignore())
            .ForMember(d => d.StmtType, m => m.Ignore())
            .ForMember(d => d.StmtInd, m => m.Ignore())
            .ForMember(d => d.PaymtMethod, m => m.Ignore())
            .ForMember(d => d.BankAcctType, m => m.Ignore())
            .ForMember(d => d.BankName, m => m.Ignore())
            .ForMember(d => d.RiskCategory, m => m.Ignore())
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => src.AcctNo))
            .ForMember(d => d.TaxId, m => m.MapFrom(src => src.TaxId))
            .ForMember(d => d.LatePaymtCharge, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.StopLPC)))
            .ForMember(d => d.SelectedDunningCd, m => m.MapFrom(src => Convert.ToString(src.DunCd)))
            .ForMember(d => d.CredtAllowanceFact, m => m.MapFrom(src => src.AllowanceFactor.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.AllowanceFactor)) : null))
            .ForMember(d => d.AccrdInterest, m => m.MapFrom(src => src.AccruedInterestAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.AccruedInterestAmt)) : null))
            .ForMember(d => d.AccrdCrdtUsg, m => m.MapFrom(src => src.AccruedCreditUsageAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.AccruedCreditUsageAmt)) : null))
            .ForMember(d => d.PromPaymtRebate, m => m.MapFrom(src => src.PromptPaymtRebate.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.PromptPaymtRebate)) : null))
            .ForMember(d => d.PPRGracePeriod, m => m.MapFrom(src => NumberExtensions.ConvertInt(src.PromptPaymtRebateTerms)))
            .ForMember(d => d.pprExpiry, m => m.MapFrom(src => NumberExtensions.DateConverter(src.PromptPaymtRebateExpiry)))
            .ForMember(d => d.LitreLimitPerTxn, m => m.MapFrom(src => src.LitLimitPerTxn.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.LitLimitPerTxn)) : null))
            .ForMember(d => d.AmtLimitPerTxn, m => m.MapFrom(src => src.AmtLimitPerTxn.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.AmtLimitPerTxn)) : null))
            .ForMember(d => d.SelectedCycNo, m => m.MapFrom(src => Convert.ToString(src.CycNo)))
            .ForMember(d => d.SelectedStmtType, m => m.MapFrom(src => src.StmtType))
            .ForMember(d => d.SelectedStmtInd, m => m.MapFrom(src => string.IsNullOrEmpty(src.StmtInd) ? "0" : src.StmtInd))
            .ForMember(d => d.StmtDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.StmtDate)))
            .ForMember(d => d.SelectedPaymtMethod, m => m.MapFrom(src => src.PaymtMethod))
            .ForMember(d => d.PaymtTerm, m => m.MapFrom(src => src.PymtTerms))
            .ForMember(d => d.GracePeriod, m => m.MapFrom(src => src.GracePeriod.HasValue?Convert.ToInt32(src.GracePeriod) : 0))
            .ForMember(d => d.DirectDebitInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.DirectDebitInd)))
            .ForMember(d => d.SelectedBankAcctType, m => m.MapFrom(src => src.BankAcctType))
            .ForMember(d => d.selectedBankName, m => m.MapFrom(src => src.BankName))
            .ForMember(d => d.BankAcctNo, m => m.MapFrom(src => src.BankAcctNo))
            .ForMember(d => d.BankBranchCD, m => m.MapFrom(src => src.BankBranchCd))
            .ForMember(d => d.PayeeCd, m => m.MapFrom(src => src.PayeeCd))
            .ForMember(d => d.SelectedTaxCategory, m => m.MapFrom(src => src.TaxCategory))
            .ForMember(d => d.WriteoffDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.WriteOffDate)))
            .ForMember(d => d.LastPaymtType, m => m.MapFrom(src => src.LastPaymtRecvType))
            .ForMember(d => d.LastPaymtReceived, m => m.MapFrom(src => src.LastPaymtRecvAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.LastPaymtRecvAmt)) : null))
            .ForMember(d => d.LastPaymtDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.LastPaymtDate)))
            .ForMember(d => d.InvoiceBillingIndicator, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.InvBillInd)))
            .ForMember(d => d.PayAdviceBillingIndicator, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.PymtInd)))
            .ForMember(d => d.VehiclePerformanceReportInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.VehPerfRptInd)))
            .ForMember(d => d.SelectedAssessmentType, m => m.MapFrom(src => src.SecuredCreditLine))
            .ForMember(d => d.SelectedRiskCategory, m => m.MapFrom(src => src.RiskCategory))
            .ForMember(d => d.CreditLimit, m => m.MapFrom(src => src.CreditLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.CreditLimit)) : null))
            .ForMember(d => d.WithholdingTaxInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.Ewt)))
            .ForMember(d => d.SelectedAssignCollector, m => m.MapFrom(src => src.Owner))
            .ForMember(d => d._skds, m => m.ResolveUsing(model => new SKDS()
            {
                SKDSNo         = model.SKDSNo,
                SKDSLitreQuota = model.SKDSQuota.HasValue? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", model.SKDSQuota)) : "",
                EffFromDate    = NumberExtensions.DateConverter(model.SKDSFromDate),
                EffToDate      = NumberExtensions.DateConverter(model.SKDSToDate),
                SKDSRate       = model.SKDSRate.HasValue ?  NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", model.SKDSRate)) : "",
                SKDSDocXref    = model.SKDSRef
            }))
            ;

            this.CreateMap <FinancialInfoModel, FinancialInfoDTO>()
            .ForMember(d => d.TaxCategory, m => m.Ignore())
            .ForMember(d => d.CycNo, m => m.Ignore())
            .ForMember(d => d.StmtType, m => m.Ignore())
            .ForMember(d => d.StmtInd, m => m.Ignore())
            .ForMember(d => d.PaymtMethod, m => m.Ignore())
            .ForMember(d => d.BankAcctType, m => m.Ignore())
            .ForMember(d => d.BankName, m => m.Ignore())
            .ForMember(d => d.RiskCategory, m => m.Ignore())
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => src.AcctNo))
            .ForMember(d => d.TaxId, m => m.MapFrom(src => src.TaxId))
            .ForMember(d => d.StopLPC, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.LatePaymtCharge)))
            .ForMember(d => d.DunCd, m => m.MapFrom(src => Convert.ToByte(src.SelectedDunningCd)))
            .ForMember(d => d.AllowanceFactor, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.CredtAllowanceFact)))
            .ForMember(d => d.AccruedInterestAmt, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.AccrdInterest)))
            .ForMember(d => d.AccruedCreditUsageAmt, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.AccrdCrdtUsg)))
            .ForMember(d => d.PromptPaymtRebate, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.PromPaymtRebate)))
            .ForMember(d => d.PromptPaymtRebateTerms, m => m.MapFrom(src => Convert.ToByte(src.PPRGracePeriod)))
            .ForMember(d => d.LitLimitPerTxn, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.LitreLimitPerTxn)))
            .ForMember(d => d.AmtLimitPerTxn, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.AmtLimitPerTxn)))
            .ForMember(d => d.PromptPaymtRebateExpiry, m => m.MapFrom(src => src.pprExpiry))
            .ForMember(d => d.CycNo, m => m.MapFrom(src => Convert.ToByte(src.SelectedCycNo)))
            .ForMember(d => d.StmtType, m => m.MapFrom(src => src.SelectedStmtType))
            .ForMember(d => d.StmtInd, m => m.MapFrom(src => src.SelectedStmtInd))
            .ForMember(d => d.StmtDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.StmtDate)))
            .ForMember(d => d.PaymtMethod, m => m.MapFrom(src => src.SelectedPaymtMethod))
            .ForMember(d => d.PymtTerms, m => m.MapFrom(src => src.PaymtTerm))
            .ForMember(d => d.GracePeriod, m => m.MapFrom(src => Convert.ToByte(src.GracePeriod)))
            .ForMember(d => d.DirectDebitInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.DirectDebitInd)))
            .ForMember(d => d.BankAcctType, m => m.MapFrom(src => src.SelectedBankAcctType))
            .ForMember(d => d.BankName, m => m.MapFrom(src => src.selectedBankName))
            .ForMember(d => d.BankBranchCd, m => m.MapFrom(src => src.BankBranchCD))
            .ForMember(d => d.TaxCategory, m => m.MapFrom(src => src.SelectedTaxCategory))
            .ForMember(d => d.PayeeCd, m => m.MapFrom(src => src.PayeeCd))
            .ForMember(d => d.WriteOffDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.WriteoffDate)))
            .ForMember(d => d.LastPaymtRecvType, m => m.MapFrom(src => src.LastPaymtType))
            .ForMember(d => d.LastPaymtRecvAmt, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.LastPaymtReceived)))
            .ForMember(d => d.LastPaymtDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.LastPaymtDate)))
            .ForMember(d => d.InvBillInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.InvoiceBillingIndicator)))
            .ForMember(d => d.PymtInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.PayAdviceBillingIndicator)))
            .ForMember(d => d.VehPerfRptInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.VehiclePerformanceReportInd)))
            .ForMember(d => d.SecuredCreditLine, m => m.MapFrom(src => src.SelectedAssessmentType))
            .ForMember(d => d.RiskCategory, m => m.MapFrom(src => src.SelectedRiskCategory))
            .ForMember(d => d.CreditLimit, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.CreditLimit)))
            .ForMember(d => d.Ewt, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.WithholdingTaxInd)))
            ;

            this.CreateMap <CostCentreDTO, CostCentre>()
            .ForMember(d => d.SelectedCostCentre, m => m.MapFrom(src => src.CostCentre))
            ;
            this.CreateMap <CostCentre, CostCentreDTO>()
            .ForMember(d => d.CostCentre, m => m.MapFrom(src => src.SelectedCostCentre))
            ;

            this.CreateMap <CreditLimitHistoryDTO, CreditLimitHistory>()
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateTimeConverter(src.CreationDate)))
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => src.AccountNo))
            .ForMember(d => d.From, m => m.MapFrom(src => !string.IsNullOrEmpty(src.From) ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.From)) : ""))
            .ForMember(d => d.To, m => m.MapFrom(src => !string.IsNullOrEmpty(src.To) ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.To)) : ""))
            .ForMember(d => d.DepositType, m => m.MapFrom(src => src.DepositType))
            .ForMember(d => d.UserId, m => m.MapFrom(src => src.UserId))
            ;
            this.CreateMap <EventLoggerDTO, EventLogger>()
            .ForMember(d => d.EventType, m => m.Ignore())
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.SelectedEventType, m => m.MapFrom(src => src.EventType))
            .ForMember(d => d.RefKey, m => m.MapFrom(src => src.ReferenceKey))
            .ForMember(d => d.SelectedReasonCode, m => m.MapFrom(src => src.ReasonCd))
            .ForMember(d => d.ReminderDatetime, m => m.MapFrom(src => NumberExtensions.DateConverter(src.Reminder)))
            .ForMember(d => d.refDoc, m => m.MapFrom(src => src.RefDocument))
            .ForMember(d => d.ClosedDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.ClosedDate)))
            .ForMember(d => d.acctNo, m => m.MapFrom(src => src.AcctNo))
            .ForMember(d => d.sysInd, m => m.MapFrom(src => src.SysInd))
            .ForMember(d => d.Description, m => m.MapFrom(src => src.Descp))
            .ForMember(d => d.SelectedEventSts, m => m.MapFrom(src => src.Status))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.CreationDate)))
            ;
            this.CreateMap <EventLogger, EventLoggerDTO>()
            .ForMember(d => d.EventType, m => m.Ignore())
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.EventType, m => m.MapFrom(src => src.SelectedEventType))
            .ForMember(d => d.EventId, m => m.MapFrom(src => src.EventId))
            .ForMember(d => d.ReferenceKey, m => m.MapFrom(src => src.RefKey))
            .ForMember(d => d.ReasonCd, m => m.MapFrom(src => src.SelectedReasonCode))
            .ForMember(d => d.Reminder, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.ReminderDatetime)))
            .ForMember(d => d.RefDocument, m => m.MapFrom(src => src.refDoc))
            .ForMember(d => d.ClosedDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.ClosedDate)))
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => src.acctNo))
            .ForMember(d => d.SysInd, m => m.MapFrom(src => src.sysInd))
            .ForMember(d => d.UserId, m => m.MapFrom(src => src.UserId))
            .ForMember(d => d.RefDocument, m => m.MapFrom(src => src.refDoc))
            .ForMember(d => d.Descp, m => m.MapFrom(src => src.Description))
            .ForMember(d => d.Status, m => m.MapFrom(src => src.SelectedEventSts))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.CreationDate)))
            ;
            this.CreateMap <TempCreditCtrlDTO, TempCreditCtrlModel>()
            .ForMember(d => d.AllowCreditLimit, m => m.MapFrom(src => src.CreditLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.CreditLimit)) : null))
            .ForMember(d => d.ExpDateFrom, m => m.MapFrom(src => NumberExtensions.DateConverter(src.EffDateFrom)))
            .ForMember(d => d.ExpDateTo, m => m.MapFrom(src => NumberExtensions.DateConverter(src.EffDateTo)))
            ;

            this.CreateMap <UpToDateBalDTO, UpToDateBal>()
            .ForMember(d => d.AcctType, m => m.MapFrom(src => CustomMapperExtensions.MapIEnumerableToList(src.AcctType)))
            .ForMember(d => d.SelectedAccountType, m => m.MapFrom(src => src.AccountType))
            .ForMember(d => d.CreditLimit, m => m.MapFrom(src => src.CreditLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.CreditLimit)) : null))
            .ForMember(d => d.OpeningBal, m => m.MapFrom(src => src.OpeningBalance.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.OpeningBalance)) : null))
            .ForMember(d => d.InstantAmt, m => m.MapFrom(src => src.InstantAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.InstantAmt)) : null))
            .ForMember(d => d.ClosingBal, m => m.MapFrom(src => src.ClosingBalance.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.ClosingBalance)) : null))
            .ForMember(d => d.TempCreditLimit, m => m.MapFrom(src => src.TempCreditLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TempCreditLimit)) : null))
            .ForMember(d => d.TotalCreditLimit, m => m.MapFrom(src => src.TotalCreditLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TotalCreditLimit)) : null))
            .ForMember(d => d.OnlineAmt, m => m.MapFrom(src => src.OnlineAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.OnlineAmt)) : null))
            .ForMember(d => d.AvailableCredLimit, m => m.MapFrom(src => src.AvailableCredit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.AvailableCredit)) : null))
            .ForMember(d => d.QuotaLimit, m => m.MapFrom(src => src.QuotaLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.QuotaLimit)) : null))
            .ForMember(d => d.QuotaUsage, m => m.MapFrom(src => src.QuotaUsage.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.QuotaUsage)) : null))
            .ForMember(d => d.OfflineAmt, m => m.MapFrom(src => src.OfflineAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.OfflineAmt)) : null))
            .ForMember(d => d.BatchAmt, m => m.MapFrom(src => src.BatchAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.BatchAmt)) : null))
            ;
            this.CreateMap <FinancilInfoItemDTO, FinancilInfoItemsList>()
            .ForMember(d => d.TxnCd, m => m.MapFrom(src => src.TxnCd.HasValue ? Convert.ToString(src.TxnCd) : ""))
            .ForMember(d => d.TxnAmt, m => m.MapFrom(src => src.TxnAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TxnAmt)) : null))
            ;
            this.CreateMap <ProductDiscountDTO, ProductDiscount>()
            .ForMember(d => d.ProdDiscType, m => m.Ignore())
            .ForMember(d => d.PlanId, m => m.Ignore())
            .ForMember(d => d.Id, m => m.MapFrom(src => Convert.ToString(src.Id)))
            .ForMember(d => d.SelectedProdCd, m => m.MapFrom(src => src.ProdGroup))
            .ForMember(d => d.SelectedProdDiscType, m => m.MapFrom(src => src.ProdDiscType))
            .ForMember(d => d.ProdDiscDescp, m => m.MapFrom(src => src.ProdDiscDescp))
            .ForMember(d => d.SelectedPlanId, m => m.MapFrom(src => Convert.ToString(src.PlanId)))
            .ForMember(d => d.EffDateFrom, m => m.MapFrom(src => NumberExtensions.DateConverter(src.EffDate)))
            .ForMember(d => d.CreatedBy, m => m.MapFrom(src => src.UserId))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.CreationDate)))
            .ForMember(d => d.ProdCdDescp, m => m.MapFrom(src => src.ProductDescp))
            .ForMember(d => d.EffDateTo, m => m.MapFrom(src => NumberExtensions.DateConverter(src.EffEndDate)))
            ;
            this.CreateMap <ProductDiscount, ProductDiscountDTO>()
            .ForMember(d => d.ProdDiscType, m => m.Ignore())
            .ForMember(d => d.PlanId, m => m.Ignore())
            .ForMember(d => d.Id, m => m.MapFrom(src => Convert.ToInt64(src.Id)))
            .ForMember(d => d.ProdGroup, m => m.MapFrom(src => src.SelectedProdCd))
            .ForMember(d => d.PlanId, m => m.MapFrom(src => Convert.ToInt32(src.SelectedPlanId)))
            .ForMember(d => d.ProdDiscType, m => m.MapFrom(src => src.SelectedProdDiscType))
            .ForMember(d => d.EffDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.EffDateFrom)))
            .ForMember(d => d.UserId, m => m.MapFrom(src => src.CreatedBy))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.CreationDate)))
            .ForMember(d => d.ProductDescp, m => m.MapFrom(src => src.ProdCdDescp))
            .ForMember(d => d.EffEndDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.EffDateTo)))
            .ForMember(d => d.OnlineInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.OnlineIndicator)))
            ;
            this.CreateMap <AcctBalanceSelectAmountDTO, OnlineTransaction>()
            .ForMember(d => d.TxnAmt, m => m.MapFrom(src => src.TxnAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TxnAmt)) : null))
            .ForMember(d => d.BillingAmt, m => m.MapFrom(src => src.BillingAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.BillingAmt)) : null))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateTimeConverter(src.CreationDate)))
            .ForMember(d => d.TxnDate, m => m.MapFrom(src => NumberExtensions.DateTimeConverter(src.TxnDate)))
            .ForMember(d => d.DueDate, m => m.MapFrom(src => NumberExtensions.DateTimeConverter(src.DueDate)))
            .ForMember(d => d.TxnId, m => m.MapFrom(src => Convert.ToString(src.TxnId)))
            .ForMember(d => d.Ids, m => m.MapFrom(src => Convert.ToString(src.Ids)))
            .ForMember(d => d.CardNo, m => m.MapFrom(src => Convert.ToString(src.CardNo)))
            ;
            this.CreateMap <PaymentTxnDTO, PaymentTxn>()
            .ForMember(d => d.PyTxnCd, m => m.Ignore())
            .ForMember(d => d.TxnType, m => m.Ignore())
            .ForMember(d => d.Affiliate, m => m.Ignore())
            .ForMember(d => d.Sts, m => m.Ignore())
            .ForMember(d => d.AppvCd, m => m.Ignore())
            .ForMember(d => d.SelectedTxnType, m => m.MapFrom(src => src.TxnType))
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => src.AccountNo))
            .ForMember(d => d.CheqNo, m => m.MapFrom(src => src.ChequeNo))
            .ForMember(d => d.selectedOwner, m => m.MapFrom(src => src.Owner))
            .ForMember(d => d.TxnDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.TxnDate)))
            .ForMember(d => d.TotAmnt, m => m.MapFrom(src => src.TxnAmount.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TxnAmount)) : null))
            .ForMember(d => d.displayTotAmnt, m => m.MapFrom(src => src.TxnAmount.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TxnAmount)) : null))
            .ForMember(d => d.BillingTxnAmt, m => m.MapFrom(src => src.BillingAmount.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.BillingAmount)) : null))
            .ForMember(d => d.Descp, m => m.MapFrom(src => src.TxnDescription))
            .ForMember(d => d.StsDescp, m => m.MapFrom(src => src.Status))
            .ForMember(d => d.DueDt, m => m.MapFrom(src => NumberExtensions.DateConverter(src.DueDate)))
            .ForMember(d => d.BookingDt, m => m.MapFrom(src => NumberExtensions.DateConverter(src.BookingDate)))
            .ForMember(d => d.Totpts, m => m.MapFrom(src => src.Pts.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.Pts)) : null))
            .ForMember(d => d.SelectedSts, m => m.MapFrom(src => src.Sts))
            .ForMember(d => d.SelectedTxnCd, m => m.MapFrom(src => Convert.ToString(src.TxnCd)))
            .ForMember(d => d.SelectedAppvCd, m => m.MapFrom(src => src.AppvCd))
            .ForMember(d => d.PyTxnId, m => m.MapFrom(src => src.TxnId))
            .ForMember(d => d.WithHeldUnsettleId, m => m.MapFrom(src => src.WUId.HasValue? src.WUId : 0))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.CreationDate)))
            .ForMember(d => d.AppRemarks, m => m.MapFrom(src => src.AppvRemarks))
            ;
            this.CreateMap <BillingItemDTO, BillingItem>()
            .ForMember(d => d.TxnCategory, m => m.Ignore())
            .ForMember(d => d.Sts, m => m.Ignore())
            .ForMember(d => d.Level, m => m.MapFrom(src => src.Level))
            .ForMember(d => d.TxnId, m => m.MapFrom(src => src.TxnId))
            .ForMember(d => d.ClosedDate, m => m.MapFrom(src => src.CloseAt))
            .ForMember(d => d.Descp, m => m.MapFrom(src => src.Descp))
            .ForMember(d => d.TxnDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.TxnDate)))
            .ForMember(d => d.DisplayBillingTxnAmt, m => m.MapFrom(src => src.BillingAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.BillingAmt)) : null))
            .ForMember(d => d.SettledAmt, m => m.MapFrom(src => src.SettledAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.SettledAmt)) : null))
            .ForMember(d => d.DisplaySettledAmt, m => m.MapFrom(src => src.SettledAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.SettledAmt)) : null))
            .ForMember(d => d.SettledDate, m => m.MapFrom(src => src.SettledDate))
            .ForMember(d => d.TxnCd, m => m.MapFrom(src => src.TxnCd))
            .ForMember(d => d.RefId, m => m.MapFrom(src => src.RefId))
            .ForMember(d => d.SelectedSts, m => m.MapFrom(src => src.Sts))
            .ForMember(d => d.TarBalance, m => m.MapFrom(src => src.TARBalance.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TARBalance)) : null))
            .ForMember(d => d.TotalTxnAmount, m => m.MapFrom(src => src.TotalBillingTxnAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TotalBillingTxnAmt)) : null))
            .ForMember(d => d.TotalSettledAmt, m => m.MapFrom(src => src.TotalSettledAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TotalSettledAmt)) : null))
            .ForMember(d => d._CreationDatenUserId, m => m.ResolveUsing(model => new CreationDatenUserId()
            {
                UserId = model.UserId, CreationDate = CardTrend.Common.Extensions.NumberExtensions.DateConverter(model.CreationDate)
            }))
            ;
        }
Пример #10
0
        protected override void Configure()
        {
            this.CreateMap <MerchGeneralInfoDTO, MA_GeneralInfo>()
            .ForMember(d => d.BankName, m => m.Ignore())
            .ForMember(d => d.BankBranchCd, m => m.Ignore())
            .ForMember(d => d.AutoDebitInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.AutoDebitInd)))
            .ForMember(d => d.AgrmntNo, m => m.MapFrom(src => src.AgreementNo))
            .ForMember(d => d.AgrmntDt, m => m.MapFrom(src => NumberExtensions.DateConverter(src.AgreementDate)))
            .ForMember(d => d.SelectedAffiliatedWithCorpCode, m => m.MapFrom(src => src.AffiliateWith))
            .ForMember(d => d.Msf, m => m.MapFrom(src => src.MSF.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.MSF)) : null))
            .ForMember(d => d.PIC, m => m.MapFrom(src => src.PersonInCharge))
            .ForMember(d => d.SelectedOwnership, m => m.MapFrom(src => src.Ownership))
            .ForMember(d => d.SelectedBusnSize, m => m.MapFrom(src => src.Establishment))
            .ForMember(d => d.CoRegDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.CoRegDate)))
            .ForMember(d => d.BankDirectDebitInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.AutoDebitInd)))
            .ForMember(d => d.SelectedBankName, m => m.MapFrom(src => src.BankName))
            .ForMember(d => d.selectedBankAccountType, m => m.MapFrom(src => src.BankAcctType))
            .ForMember(d => d.SelectedBankBranchCd, m => m.MapFrom(src => src.BankBranchCd))
            .ForMember(d => d.SelectedCurrentStatus, m => m.MapFrom(src => src.Sts))
            .ForMember(d => d.EnttId, m => m.MapFrom(src => src.EntityId))
            .ForMember(d => d.WithholdingTaxRate, m => m.MapFrom(src => src.WithholdingTaxRate.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.WithholdingTaxRate)) : null))
            .ForMember(d => d.SelectedCycleNo, m => m.MapFrom(src => Convert.ToString(src.CycNo)))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.CreationDate)))
            .ForMember(d => d.SelectedReasonCode, m => m.MapFrom(src => src.ReasonCd))
            .ForMember(d => d.SelectedBusnModel, m => m.MapFrom(src => src.Moso))
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => src.AcctNo.HasValue ? Convert.ToString(src.AcctNo) : ""))
            ;
            this.CreateMap <MerchGeneralInfoDTO, MerchantDetails>()
            .ForMember(d => d.CurrentStatus, m => m.Ignore())
            .ForMember(d => d.TxnCode, m => m.Ignore())
            .ForMember(d => d.Ownership, m => m.Ignore())
            .ForMember(d => d.MCC, m => m.Ignore())
            .ForMember(d => d.SIC, m => m.Ignore())
            .ForMember(d => d.DBACity, m => m.Ignore())
            .ForMember(d => d.DBARegion, m => m.Ignore())
            .ForMember(d => d.DBAState, m => m.Ignore())
            .ForMember(d => d.BankAcctName, m => m.Ignore())
            .ForMember(d => d.BankAcctType, m => m.Ignore())
            .ForMember(d => d.BankBranchCode, m => m.Ignore())
            .ForMember(d => d.cycNo, m => m.Ignore())
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.PaymtMode, m => m.Ignore())
            .ForMember(d => d.BusinessName, m => m.MapFrom(src => src.BusnName))
            .ForMember(d => d.AgreementDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.AgreementDate)))
            .ForMember(d => d.AutoDebitInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.AutoDebitInd)))
            .ForMember(d => d.PersonInCharge, m => m.MapFrom(src => src.PersonInCharge))
            .ForMember(d => d.selectedOwnershsip, m => m.MapFrom(src => src.Ownership))
            .ForMember(d => d.BusnSize, m => m.MapFrom(src => src.Establishment))
            .ForMember(d => d.SelectedSIC, m => m.MapFrom(src => src.Sic))
            .ForMember(d => d.SelectedMCC, m => m.MapFrom(src => src.Mcc))
            .ForMember(d => d.SelectedAreaCode, m => m.MapFrom(src => src.AreaCd))
            .ForMember(d => d.CoRegDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.CoRegDate)))
            .ForMember(d => d.OwnershipTrsfDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.OwnershipTrsfDate)))
            .ForMember(d => d.SelectDBARegion, m => m.MapFrom(src => src.DBARegion))
            .ForMember(d => d.SelectDBACity, m => m.MapFrom(src => src.DBACity))
            .ForMember(d => d.SelectDBAState, m => m.MapFrom(src => src.DBAState))
            .ForMember(d => d.AutoDebitInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.AutoDebitInd)))
            .ForMember(d => d.SelectedBankAcctName, m => m.MapFrom(src => src.BankName))
            .ForMember(d => d.selectedBankAcctType, m => m.MapFrom(src => src.BankAcctType))
            .ForMember(d => d.BankAccountNo, m => m.MapFrom(src => src.BankAcctNo))
            .ForMember(d => d.SelectedBankBranchCode, m => m.MapFrom(src => src.BankBranchCd))
            .ForMember(d => d.selectedCurrentStatus, m => m.MapFrom(src => src.Sts))
            .ForMember(d => d.WithholdingTaxInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.WithholdingTaxInd)))
            .ForMember(d => d.WithholdingTaxRate, m => m.MapFrom(src => src.WithholdingTaxRate.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.WithholdingTaxRate)) : ""))
            .ForMember(d => d.SelectedcycNo, m => m.MapFrom(src => Convert.ToString(src.CycNo)))
            .ForMember(d => d.UserID, m => m.MapFrom(src => src.UserId))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.CreationDate)))
            .ForMember(d => d.SelectedReasonCode, m => m.MapFrom(src => src.ReasonCd))
            .ForMember(d => d.StmtPrintInd, m => m.MapFrom(src => NumberExtensions.BoolConverter((src.StmtPrint))))
            .ForMember(d => d.SiteId, m => m.MapFrom(src => src.ReconAcct))
            .ForMember(d => d.BusnLoc, m => m.MapFrom(src => src.BusnLocation))
            .ForMember(d => d.TopupAmt, m => m.MapFrom(src => src.TopUpAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TopUpAmt)) : ""))
            .ForMember(d => d.TopupLimit, m => m.MapFrom(src => src.TopUpLimit.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.TopUpLimit)) : ""))
            ;
            this.CreateMap <MerchantDetails, MerchGeneralInfoDTO>()
            .ForMember(d => d.Ownership, m => m.Ignore())
            .ForMember(d => d.DBACity, m => m.Ignore())
            .ForMember(d => d.DBARegion, m => m.Ignore())
            .ForMember(d => d.DBAState, m => m.Ignore())
            .ForMember(d => d.BankAcctType, m => m.Ignore())
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.BusnName, m => m.MapFrom(src => src.BusinessName))
            .ForMember(d => d.AgreementDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.AgreementDate)))
            .ForMember(d => d.AutoDebitInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.AutoDebitInd)))
            .ForMember(d => d.PersonInCharge, m => m.MapFrom(src => src.PersonInCharge))
            .ForMember(d => d.Ownership, m => m.MapFrom(src => src.selectedOwnershsip))
            .ForMember(d => d.Establishment, m => m.MapFrom(src => src.BusnSize))
            .ForMember(d => d.Sic, m => m.MapFrom(src => src.SelectedSIC))
            .ForMember(d => d.AreaCd, m => m.MapFrom(src => src.SelectedAreaCode))
            .ForMember(d => d.Mcc, m => m.MapFrom(src => src.SelectedMCC))
            .ForMember(d => d.CoRegDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.CoRegDate)))
            .ForMember(d => d.OwnershipTrsfDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.OwnershipTrsfDate)))
            .ForMember(d => d.DBARegion, m => m.MapFrom(src => src.SelectDBARegion))
            .ForMember(d => d.DBACity, m => m.MapFrom(src => src.SelectDBACity))
            .ForMember(d => d.DBAState, m => m.MapFrom(src => src.SelectDBAState))
            .ForMember(d => d.AutoDebitInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.AutoDebitInd)))
            .ForMember(d => d.BankName, m => m.MapFrom(src => src.SelectedBankAcctName))
            .ForMember(d => d.BankAcctType, m => m.MapFrom(src => src.selectedBankAcctType))
            .ForMember(d => d.BankAcctNo, m => m.MapFrom(src => src.BankAccountNo))
            .ForMember(d => d.BankBranchCd, m => m.MapFrom(src => src.SelectedBankBranchCode))
            .ForMember(d => d.Sts, m => m.MapFrom(src => src.selectedCurrentStatus))
            .ForMember(d => d.WithholdingTaxInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.WithholdingTaxInd)))
            .ForMember(d => d.WithholdingTaxRate, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.WithholdingTaxRate)))
            .ForMember(d => d.CycNo, m => m.MapFrom(src => Convert.ToByte(src.SelectedcycNo)))
            .ForMember(d => d.UserId, m => m.MapFrom(src => src.UserID))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.CreationDate)))
            .ForMember(d => d.ReasonCd, m => m.MapFrom(src => src.SelectedReasonCode))
            .ForMember(d => d.StmtPrint, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB((src.StmtPrintInd))))
            .ForMember(d => d.ReconAcct, m => m.MapFrom(src => src.SiteId))
            .ForMember(d => d.BusnLocation, m => m.MapFrom(src => src.BusnLoc))
            .ForMember(d => d.TopUpAmt, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.TopupAmt)))
            .ForMember(d => d.TopUpLimit, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.TopupLimit)))
            ;
            this.CreateMap <EServiceDTO, eService>()
            .ForMember(d => d.Siteid, m => m.MapFrom(src => src.SiteId))
            .ForMember(d => d.bankName, m => m.MapFrom(src => src.BankName))
            .ForMember(d => d.PostingDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.PrcsDate)))
            .ForMember(d => d.TxnDate, m => m.MapFrom(src => src.LocalDate))
            .ForMember(d => d.TxnTime, m => m.MapFrom(src => src.LocalTime))
            .ForMember(d => d.CardNo, m => m.MapFrom(src => Convert.ToString(src.CardNo)))
            .ForMember(d => d.RRN, m => m.MapFrom(src => Convert.ToString(src.Rrn)))
            .ForMember(d => d.Quantity, m => m.MapFrom(src => Convert.ToInt32(src.Qty)))
            .ForMember(d => d.Amount, m => m.MapFrom(src => src.BillingAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.BillingAmt)) : ""))
            .ForMember(d => d.MDR, m => m.MapFrom(src => src.BillingAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.BillingAmt)) : ""))
            .ForMember(d => d.VatAmount, m => m.MapFrom(src => src.VATAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.VATAmt)) : ""))
            .ForMember(d => d.NetAmount, m => m.MapFrom(src => src.NetAmt.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.NetAmt)) : ""))
            ;
            this.CreateMap <BusnLocTerminalDTO, BusnLocTerminal>()
            .ForMember(d => d.ProdType, m => m.Ignore())
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.TermType, m => m.Ignore())
            .ForMember(d => d.SelectedTermType, m => m.MapFrom(src => src.TermType))
            .ForMember(d => d.SelectedStatus, m => m.MapFrom(src => src.Status))
            .ForMember(d => d.RawStatus, m => m.MapFrom(src => src.Sts))
            .ForMember(d => d.DeployDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.DeployDate)))
            .ForMember(d => d.Replacement, m => m.MapFrom(src => src.ReplacedByTermId))
            .ForMember(d => d.ReplacedDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.ReplacedDate)))
            .ForMember(d => d.SelectedReasonCode, m => m.MapFrom(src => src.ReasonCd))
            .ForMember(d => d.IPEK, m => m.MapFrom(src => Convert.ToString(src.IPEK)))
            .ForMember(d => d.SettlementStart, m => m.MapFrom(src => NumberExtensions.DateConverter(src.SettleFromTime)))
            .ForMember(d => d.SettlementEnd, m => m.MapFrom(src => NumberExtensions.DateConverter(src.SettleToTime)))
            .ForMember(d => d.LastBatchId, m => m.MapFrom(src => Convert.ToInt32(src.LastBatchId)))
            .ForMember(d => d.SettleTxnId, m => m.MapFrom(src => Convert.ToInt32(src.SettleTxnId)))
            .ForMember(d => d.SelectedProdType, m => m.MapFrom(src => src.DeviceModel))
            .ForMember(d => d.SerialNo, m => m.MapFrom(src => src.SerialNo))
            .ForMember(d => d.Descp, m => m.MapFrom(src => src.Reason))
            .ForMember(d => d.Remarks, m => m.MapFrom(src => src.Remarks))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.CreationDate)))
            .ForMember(d => d.LastUpdDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.LastUpdDate)))
            ;
            this.CreateMap <BusnLocTerminal, BusnLocTerminalDTO>()
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.TermType, m => m.Ignore())
            .ForMember(d => d.TermType, m => m.MapFrom(src => src.SelectedTermType))
            .ForMember(d => d.Status, m => m.MapFrom(src => src.SelectedStatus))
            .ForMember(d => d.Sts, m => m.MapFrom(src => src.RawStatus))
            .ForMember(d => d.DeployDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.DeployDate)))
            .ForMember(d => d.ReplacedByTermId, m => m.MapFrom(src => src.Replacement))
            .ForMember(d => d.ReplacedDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.ReplacedDate)))
            .ForMember(d => d.ReasonCd, m => m.MapFrom(src => src.SelectedReasonCode))
            .ForMember(d => d.IPEK, m => m.MapFrom(src => src.IPEK))
            .ForMember(d => d.SettleFromTime, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.SettlementStart)))
            .ForMember(d => d.SettleToTime, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.SettlementEnd)))
            .ForMember(d => d.LastBatchId, m => m.MapFrom(src => src.LastBatchId))
            .ForMember(d => d.SettleTxnId, m => m.MapFrom(src => Convert.ToInt64(src.SettleTxnId)))
            .ForMember(d => d.DeviceModel, m => m.MapFrom(src => src.SelectedProdType))
            .ForMember(d => d.SerialNo, m => m.MapFrom(src => src.SerialNo))
            .ForMember(d => d.Reason, m => m.MapFrom(src => src.Descp))
            .ForMember(d => d.Remarks, m => m.MapFrom(src => src.Remarks))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.CreationDate)))
            .ForMember(d => d.LastUpdDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.LastUpdDate)))
            ;
            this.CreateMap <MerchChangeOwnershipDTO, MerchChangeOwnership>()
            .ForMember(d => d.DBAState, m => m.Ignore())
            .ForMember(d => d.BankName, m => m.Ignore())
            .ForMember(d => d.BankAcctType, m => m.Ignore())
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => src.CreationDate))
            .ForMember(d => d.CutoffDate, m => m.MapFrom(src => src.CutOffDate))
            .ForMember(d => d.NewSiteId, m => m.MapFrom(src => src.NewSiteId))
            .ForMember(d => d.SelectedDBAState, m => m.MapFrom(src => src.DBAState))
            .ForMember(d => d.SelectedBankName, m => m.MapFrom(src => src.BankName))
            .ForMember(d => d.SelectedBankAcctType, m => m.MapFrom(src => src.BankAcctType))
            .ForMember(d => d.ToMerchantId, m => m.MapFrom(src => src.ToMerchantID))
            .ForMember(d => d.FromMerchantId, m => m.MapFrom(src => src.FromMerchantId))
            .ForMember(d => d.SAPNo, m => m.MapFrom(src => src.SapNo))
            .ForMember(d => d.CutoffDate, m => m.MapFrom(src => src.CutOffDate))
            .ForMember(d => d.MaskedFlag, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.MaskedFlag)))
            .ForMember(d => d.FloatAcctInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.FloatAcctInd)))
            ;
            this.CreateMap <MerchChangeOwnership, MerchChangeOwnershipDTO>()
            .ForMember(d => d.DBAState, m => m.Ignore())
            .ForMember(d => d.BankName, m => m.Ignore())
            .ForMember(d => d.BankAcctType, m => m.Ignore())
            .ForMember(d => d.ToMerchantID, m => m.MapFrom(src => src.ToMerchantId))
            .ForMember(d => d.CurrentBusnNo, m => m.MapFrom(src => src.FromMerchantId))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.CreationDate)))
            .ForMember(d => d.CurrentBusnNo, m => m.MapFrom(src => src.FromMerchantId))
            .ForMember(d => d.CurrentSiteId, m => m.MapFrom(src => src.CurrentSiteId))
            .ForMember(d => d.CutOffDate, m => m.MapFrom(src => src.CutoffDate))
            .ForMember(d => d.FloatAcctInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.FloatAcctInd)))
            .ForMember(d => d.DBAState, m => m.MapFrom(src => src.SelectedDBAState))
            .ForMember(d => d.BankName, m => m.MapFrom(src => src.SelectedBankName))
            .ForMember(d => d.FloatAcctInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.FloatAcctInd)))
            .ForMember(d => d.BankAcctType, m => m.MapFrom(src => src.SelectedBankAcctType))
            .ForMember(d => d.SapNo, m => m.MapFrom(src => src.SAPNo))
            ;
            this.CreateMap <MerchProductPrizeDTO, MerchProductPrize>()
            .ForMember(d => d.ProdCd, m => m.Ignore())
            .ForMember(d => d.EffDateFrom, m => m.MapFrom(src => NumberExtensions.DateConverter(src.StartDate)))
            .ForMember(d => d.EffDateTo, m => m.MapFrom(src => NumberExtensions.DateConverter(src.EndDate)))
            .ForMember(d => d.Descp, m => m.MapFrom(src => src.Product))
            .ForMember(d => d.Price, m => m.MapFrom(src => src.Price.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.Price)) : ""))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.CreationDate)))
            ;
            this.CreateMap <MerchProductPrize, MerchProductPrizeDTO>()
            .ForMember(d => d.StartDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.EffDateFrom)))
            .ForMember(d => d.EndDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.EffDateTo)))
            .ForMember(d => d.Product, m => m.MapFrom(src => src.Descp))
            .ForMember(d => d.ProdCd, m => m.MapFrom(src => src.SelectedProdCd))
            .ForMember(d => d.Price, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.Price)))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.ConvertDatetimeDB(src.CreationDate)))
            ;

            this.CreateMap <MerchAgreementGeneralInfoDTO, MA_GeneralInfo>()
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => src.MerchantAccount))
            .ForMember(d => d.PIC, m => m.MapFrom(src => src.PersonInCharge))
            .ForMember(d => d.SAPNo, m => m.MapFrom(src => src.SAPNo))
            .ForMember(d => d.BusnName, m => m.MapFrom(src => src.BusinessName))
            .ForMember(d => d.SelectedAffiliatedWithCorpCode, m => m.MapFrom(src => src.AffiliatedWith))
            .ForMember(d => d.WithholdingTaxInd, m => m.MapFrom(src => src.WithholdingTaxInd))
            .ForMember(d => d.WithholdingTaxRate, m => m.MapFrom(src => NumberExtensions.ConverterDecimal(src.WithholdingTaxRate.ToString())))
            .ForMember(d => d.TaxId, m => m.MapFrom(src => src.TaxId))
            .ForMember(d => d.SelectedCurrentStatus, m => m.MapFrom(src => src.Status))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.CreationDate)))
            ;
            this.CreateMap <MA_GeneralInfo, MerchAgreementGeneralInfoDTO>()
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => src.AcctNo))
            .ForMember(d => d.BusinessName, m => m.MapFrom(src => src.BusnName))
            .ForMember(d => d.AgreeNo, m => m.MapFrom(src => src.AgrmntNo))
            .ForMember(d => d.AgreeDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.AgrmntDt)))
            .ForMember(d => d.AffiliatedWith, m => m.MapFrom(src => src.SelectedAffiliatedWithCorpCode))
            .ForMember(d => d.SAPNo, m => m.MapFrom(src => src.SAPNo))
            .ForMember(d => d.Msf, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.Msf)))
            .ForMember(d => d.PersonInCharge, m => m.MapFrom(src => src.PIC))
            .ForMember(d => d.ReasonCd, m => m.MapFrom(src => (src.SelectedReasonCode)))
            .ForMember(d => d.Ownership, m => m.MapFrom(src => src.SelectedOwnership))
            .ForMember(d => d.Establishment, m => m.MapFrom(src => src.SelectedBusnSize))
            .ForMember(d => d.CoRegsNo, m => m.MapFrom(src => src.CoRegNo))
            .ForMember(d => d.CoRegsName, m => m.MapFrom(src => src.CoRegName))
            .ForMember(d => d.CoRegsDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.CoRegDate)))
            .ForMember(d => d.Moso, m => m.MapFrom(src => src.SelectedBusnModel))
            .ForMember(d => d.PayeeName, m => m.MapFrom(src => src.PayeeName))
            .ForMember(d => d.AutoDebit, m => m.MapFrom(src => src.BankDirectDebitInd))
            .ForMember(d => d.BankName, m => m.MapFrom(src => src.SelectedBankName))
            .ForMember(d => d.BankAcctType, m => m.MapFrom(src => src.selectedBankAccountType))
            .ForMember(d => d.BankAcctNo, m => m.MapFrom(src => src.BankAcctNo))
            .ForMember(d => d.BankBranchCd, m => m.MapFrom(src => src.SelectedBankBranchCd))
            .ForMember(d => d.Status, m => m.MapFrom(src => src.SelectedCurrentStatus))
            .ForMember(d => d.EntityId, m => m.MapFrom(src => src.EnttId))
            .ForMember(d => d.TaxId, m => m.MapFrom(src => src.TaxId))
            .ForMember(d => d.WithholdInd, m => m.MapFrom(src => src.WithholdingTaxInd))
            .ForMember(d => d.WithholdingTaxRate, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.WithholdingTaxRate)))
            .ForMember(d => d.CycNo, m => m.MapFrom(src => src.SelectedCycleNo))
            .ForMember(d => d.UserId, m => m.MapFrom(src => src.UserId))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(CardTrend.Common.Extensions.NumberExtensions.DateConverter(DateTime.Now))))
            ;
        }
        protected override void Configure()
        {
            this.CreateMap <MilestoneDTO, Milestone>()
            .ForMember(d => d.Priority, m => m.Ignore())
            .ForMember(d => d.TaskNo, m => m.Ignore())
            .ForMember(d => d.Owner, m => m.Ignore())
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.SelectedTaskNo, m => m.MapFrom(src => src.TaskNo))
            .ForMember(d => d.selectedStatus, m => m.MapFrom(src => src.StsDescp))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateTimeConverter2(src.CreationDate)))
            .ForMember(d => d.LastUpdDate, m => m.MapFrom(src => (!src.LastUpdDate.HasValue ? string.Empty : src.LastUpdDate.ToString())))
            .ForMember(d => d.selectedReasonCd, m => m.MapFrom(src => src.ReasonCd))
            .ForMember(d => d.CompanyName, m => m.MapFrom(src => (src.WorkflowCd == "APPL" ? src.CmpyName1 : src.CmpyName)))
            .ForMember(d => d.RecallDate, m => m.MapFrom(src => (src.WorkflowCd == "APPL" ? src.RecallDate : src.LastUpdDate.ToString())))
            .ForMember(d => d.selectedPriority, m => m.MapFrom(src => src.Priority))
            .ForMember(d => d.ID, m => m.MapFrom(src => src.Id))
            .ForMember(d => d.BatchID, m => m.MapFrom(src => src.BatchId))
            .ForMember(d => d.Descp, m => m.MapFrom(src => (!string.IsNullOrEmpty(src.AssessmentType) ? src.AssessmentType : src.RequestType)))
            .ForMember(d => d.CardNumber, m => m.MapFrom(src => Convert.ToString(src.CardNo)))
            .ForMember(d => d.RequestValue, m => m.MapFrom(src => src.ReqVal))
            .ForMember(d => d.workflowcd, m => m.MapFrom(src => src.WorkflowCd))
            .ForMember(d => d.selectedOwner, m => m.MapFrom(src => src.Owner))
            .ForMember(d => d.CreditLimit, m => m.MapFrom(src => NumberExtensions.ConverterDecimal(src.CreditLimit.ToString())))
            .ForMember(d => d.SecurityAmt, m => m.MapFrom(src => NumberExtensions.ConverterDecimal(src.SecurityAmt.ToString())))
            ;
            this.CreateMap <SPOMilestoneDTO, Milestone>()
            .ForMember(d => d.TaskNo, m => m.Ignore())
            .ForMember(d => d.RefKey, m => m.MapFrom(src => src.EventId))
            .ForMember(d => d.Descp, m => m.MapFrom(src => src.ReqType))
            .ForMember(d => d.RequestValue, m => m.MapFrom(src => src.ReqValue))
            .ForMember(d => d.SelectedTaskNo, m => m.MapFrom(src => Convert.ToString(src.TaskNo)))
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => Convert.ToString(src.AcctNo)))
            .ForMember(d => d.CardNumber, m => m.MapFrom(src => Convert.ToString(src.CardNo)))
            .ForMember(d => d.CompanyName, m => m.MapFrom(src => (src.CmpyName)))
            .ForMember(d => d.selectedStatus, m => m.MapFrom(src => src.Sts))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateTimeConverter2(src.ReqDate)))
            .ForMember(d => d.LastUpdDate, m => m.MapFrom(src => NumberExtensions.DateTimeConverter2(src.LastUpdDate)))
            .ForMember(d => d.RequestBy, m => m.MapFrom(src => src.ReqBy))
            .ForMember(d => d.workflowcd, m => m.MapFrom(src => src.WorkflowCd))
            ;
            this.CreateMap <AcctSignUp, AcctSignUpDTO>()
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.ClientType, m => m.Ignore())
            .ForMember(d => d.ClientClass, m => m.Ignore())
            .ForMember(d => d.LangId, m => m.Ignore())
            .ForMember(d => d.TaxCategory, m => m.Ignore())
            .ForMember(d => d.InvoicePref, m => m.Ignore())
            .ForMember(d => d.PlasticType, m => m.Ignore())
            .ForMember(d => d.PlasticType, m => m.MapFrom(src => src.selectedPlasticType))
            .ForMember(d => d.CycNo, m => m.MapFrom(src => Convert.ToByte(src.SelectedCycleNo)))
            .ForMember(d => d.ApplId, m => m.MapFrom(src => src.ApplicationId))
            .ForMember(d => d.CorpCd, m => m.MapFrom(src => src.SelectedCorporateAcct))
            .ForMember(d => d.Reference, m => m.MapFrom(src => src.ApplicationRef))
            .ForMember(d => d.CmpyLegalName, m => m.MapFrom(src => src.CompanyLegalName))
            .ForMember(d => d.CmpyName, m => m.MapFrom(src => src.CompanyName))
            .ForMember(d => d.CmpyEmbName, m => m.MapFrom(src => src.CompanyEmbName))
            .ForMember(d => d.ContactPerson, m => m.MapFrom(src => src.ContactPerson))
            .ForMember(d => d.BusnCategory, m => m.MapFrom(src => src.SelectedBusinessCategory))
            .ForMember(d => d.CmpyType, m => m.MapFrom(src => src.selectedCompanyType))
            .ForMember(d => d.SAPNo, m => m.MapFrom(src => src.SapNo))
            .ForMember(d => d.EmailAddr, m => m.MapFrom(src => src.emailAddress))
            .ForMember(d => d.CmpyRegsNo, m => m.MapFrom(src => src.CompanyRegnNo))
            .ForMember(d => d.CmpyRegsDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.CompanyRegnDate)))
            .ForMember(d => d.NatureOfBusn, m => m.MapFrom(src => src.SelectedNatureOfBusiness))
            .ForMember(d => d.BillMethod, m => m.MapFrom(src => src.SelectedBillingType))
            .ForMember(d => d.InvoicePref, m => m.MapFrom(src => src.SelectedInvoicePref))
            .ForMember(d => d.InvBillInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.InvoiceBillingIndicator)))
            .ForMember(d => d.PymtInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.PymtInd)))
            .ForMember(d => d.VehPerfRptInd, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.VehiclePerformanceReportInd)))
            .ForMember(d => d.LoyaltyeBusn, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.LoyaltyeBusn)))
            .ForMember(d => d.TaxCategory, m => m.MapFrom(src => src.SelectedTaxCategory))
            .ForMember(d => d.WithHoldingTax, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.WithholdingTaxInd)))
            .ForMember(d => d.LangId, m => m.MapFrom(src => src.SelectedLangId))
            .ForMember(d => d.Website, m => m.MapFrom(src => src.website))
            .ForMember(d => d.ClientClass, m => m.MapFrom(src => src.SelectedClientClass))
            .ForMember(d => d.ClientType, m => m.MapFrom(src => src.SelectedClientType))
            .ForMember(d => d.ReasonCd, m => m.MapFrom(src => src.SelectedReasonCode))
            .ForMember(d => d.AuthName, m => m.MapFrom(src => src.AuthSignatory))
            ;
            this.CreateMap <AcctSignUpDTO, AcctSignUp>()
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.ClientType, m => m.Ignore())
            .ForMember(d => d.ClientClass, m => m.Ignore())
            .ForMember(d => d.LangId, m => m.Ignore())
            .ForMember(d => d.TaxCategory, m => m.Ignore())
            .ForMember(d => d.InvoicePref, m => m.Ignore())
            .ForMember(d => d.PlasticType, m => m.Ignore())
            .ForMember(d => d.selectedPlasticType, m => m.MapFrom(src => src.PlasticType))
            .ForMember(d => d.SelectedCycleNo, m => m.MapFrom(src => Convert.ToString(src.CycNo)))
            .ForMember(d => d.ApplicationId, m => m.MapFrom(src => src.ApplId))
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => src.AcctNo))
            .ForMember(d => d.SelectedCorporateAcct, m => m.MapFrom(src => src.CorpCd))
            .ForMember(d => d.ApplicationRef, m => m.MapFrom(src => src.Reference))
            .ForMember(d => d.CompanyLegalName, m => m.MapFrom(src => src.CmpyLegalName))
            .ForMember(d => d.CompanyName, m => m.MapFrom(src => src.CmpyName))
            .ForMember(d => d.CompanyEmbName, m => m.MapFrom(src => src.CmpyEmbName))
            .ForMember(d => d.ContactPerson, m => m.MapFrom(src => src.ContactPerson))
            .ForMember(d => d.SelectedBusinessCategory, m => m.MapFrom(src => src.BusnCategory))
            .ForMember(d => d.selectedCompanyType, m => m.MapFrom(src => src.CmpyType))
            .ForMember(d => d.SapNo, m => m.MapFrom(src => src.SAPNo))
            .ForMember(d => d.emailAddress, m => m.MapFrom(src => src.EmailAddr))
            .ForMember(d => d.CompanyRegnNo, m => m.MapFrom(src => src.CmpyRegsNo))
            .ForMember(d => d.CompanyRegnDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.CmpyRegsDate)))
            .ForMember(d => d.SelectedNatureOfBusiness, m => m.MapFrom(src => src.NatureOfBusn))
            .ForMember(d => d.SelectedBillingType, m => m.MapFrom(src => !string.IsNullOrEmpty(src.BillMethod) ? src.BillMethod : "F"))
            .ForMember(d => d.SelectedInvoicePref, m => m.MapFrom(src => !string.IsNullOrEmpty(src.InvoicePref) ? src.InvoicePref : "0"))
            .ForMember(d => d.InvoiceBillingIndicator, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.InvBillInd)))
            .ForMember(d => d.PymtInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.PymtInd)))
            .ForMember(d => d.VehiclePerformanceReportInd, m => m.MapFrom(src => true))
            .ForMember(d => d.LoyaltyeBusn, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.LoyaltyeBusn)))
            .ForMember(d => d.SelectedTaxCategory, m => m.MapFrom(src => src.TaxCategory))
            .ForMember(d => d.WithholdingTaxInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.WithHoldingTax)))
            .ForMember(d => d.SelectedLangId, m => m.MapFrom(src => src.LangId))
            .ForMember(d => d.website, m => m.MapFrom(src => src.Website))
            .ForMember(d => d.SelectedClientClass, m => m.MapFrom(src => src.ClientClass))
            .ForMember(d => d.SelectedClientType, m => m.MapFrom(src => src.ClientType))
            .ForMember(d => d.SelectedReasonCode, m => m.MapFrom(src => src.ReasonCd))
            .ForMember(d => d.AuthSignatory, m => m.MapFrom(src => src.AuthName))
            ;

            this.CreateMap <VeloctyLimitListMaintDTO, VeloctyLimitListMaintModel>()
            .ForMember(d => d.VelocityIndDescp, m => m.MapFrom(src => src.VelocityIndicatorDescription))
            .ForMember(d => d.velocityCounter, m => m.MapFrom(src => src.Counter.ToString()))
            .ForMember(d => d.ddlVelocityLimit, m => m.MapFrom(src => decimal.Round(src.VelocityAmount, 2, MidpointRounding.AwayFromZero)))
            .ForMember(d => d.VelocityLitre, m => m.MapFrom(src => decimal.Round(src.VelocityLitre, 2, MidpointRounding.AwayFromZero)))
            .ForMember(d => d.SpentCnt, m => m.MapFrom(src => Convert.ToInt32(src.SpentCounter)))
            .ForMember(d => d.SpentLimit, m => m.MapFrom(src => decimal.Round(src.SpentAmount, 2, MidpointRounding.AwayFromZero)))
            .ForMember(d => d.SpentLitre, m => m.MapFrom(src => decimal.Round(src.SpentLitre, 3, MidpointRounding.AwayFromZero)))
            .ForMember(d => d.LastUpdateDate, m => m.MapFrom(src => src.LastUpdateDate.HasValue ? NumberExtensions.DateTimeConverter(src.LastUpdateDate) : ""))
            .ForMember(d => d.UserId, m => m.MapFrom(src => src.UserId))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => src.CreationDate.HasValue ? NumberExtensions.DateTimeConverter(src.CreationDate) : ""))
            .ForMember(d => d.SelectedVelocityInd, m => m.MapFrom(src => src.VelocityIndicator))
            .ForMember(d => d.SelectedProdCd, m => m.MapFrom(src => src.ProductCode))
            .ForMember(d => d.CostCentreDescription, m => m.MapFrom(src => src.CostCentreDescription))
            .ForMember(d => d.CostCentre, m => m.MapFrom(src => src.CostCentreCode))
            ;
            this.CreateMap <VeloctyLimitListMaintModel, VeloctyLimitListMaintDTO>()
            .ForMember(d => d.AccNo, m => m.MapFrom(src => src._CardnAccNo.AccNo))
            .ForMember(d => d.CardNo, m => m.MapFrom(src => src._CardnAccNo.CardNo))
            .ForMember(d => d.ApplId, m => m.MapFrom(src => src.ApplId))
            .ForMember(d => d.AppcId, m => m.MapFrom(src => src.AppcId))
            .ForMember(d => d.CostCentre, m => m.MapFrom(src => src.CostCentre))
            .ForMember(d => d.SelectedCorpCd, m => m.MapFrom(src => src.SelectedCorpCd))
            .ForMember(d => d.LastUpdateDate, m => m.MapFrom(src => NumberExtensions.ConvertToDatetimeDB(src.LastUpdateDate)))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.ConvertToDatetimeDB(src.CreationDate)))
            .ForMember(d => d.VelocityIndicator, m => m.MapFrom(src => src.SelectedVelocityInd))
            .ForMember(d => d.VelocityAmount, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.ddlVelocityLimit)))
            .ForMember(d => d.Counter, m => m.MapFrom(src => Convert.ToInt32(src.velocityCounter)))
            .ForMember(d => d.VelocityLitre, m => m.MapFrom(src => src.VelocityLitre))
            ;

            this.CreateMap <VehicleDTO, VehiclesListModel>()
            .ForMember(d => d.CardType, m => m.Ignore())
            .ForMember(d => d.VehMaker, m => m.Ignore())
            .ForMember(d => d.VehModel, m => m.Ignore())
            .ForMember(d => d.VehYr, m => m.Ignore())
            .ForMember(d => d.VehType, m => m.Ignore())
            .ForMember(d => d.VehColor, m => m.Ignore())
            .ForMember(d => d.Sts, m => m.Ignore())
            .ForMember(d => d.SelectedCardType, m => m.MapFrom(src => src.CardType))
            .ForMember(d => d.pin, m => m.MapFrom(src => src.PIN))
            .ForMember(d => d.VehRegtNo, m => m.MapFrom(src => src.VRN))
            .ForMember(d => d.SkdsInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.SKDSInd)))
            .ForMember(d => d.VehRegDate, m => m.MapFrom(src => src.RegisteredDate.HasValue ? NumberExtensions.DateConverter(src.RegisteredDate) : ""))
            .ForMember(d => d.SelectedVehMaker, m => m.MapFrom(src => src.VehicleMaker))
            .ForMember(d => d.SelectedSts, m => m.MapFrom(src => src.Status))
            .ForMember(d => d.XrefCardNo, m => m.MapFrom(src => src.XrefCardNo.HasValue ? Convert.ToString(src.XrefCardNo):""))
            .ForMember(d => d.OdoMeterReading, m => m.MapFrom(src => src.OdometerReading.HasValue? Convert.ToString(src.OdometerReading):""))
            .ForMember(d => d.OdoMeterUpdate, m => m.MapFrom(src => src.OdometerUpdate.HasValue ? NumberExtensions.DateConverter(src.OdometerUpdate) : ""))
            .ForMember(d => d.PolicyExpDate, m => m.MapFrom(src => src.CardExpiry))
            .ForMember(d => d.RoadTaxExpDate, m => m.MapFrom(src => src.RoadTaxExpiry.HasValue ? NumberExtensions.DateConverter(src.RoadTaxExpiry) : ""))
            .ForMember(d => d.SelectedVehType, m => m.MapFrom(src => src.VehicleType))
            .ForMember(d => d.SelectedVehColor, m => m.MapFrom(src => src.VehicleColor))
            .ForMember(d => d.SelectedVehModel, m => m.MapFrom(src => src.VehicleModel))
            ;
            this.CreateMap <VehiclesListModel, VehicleDTO>()
            .ForMember(d => d.CardType, m => m.Ignore())
            .ForMember(d => d.CardType, m => m.MapFrom(src => src.SelectedCardType))
            .ForMember(d => d.PIN, m => m.MapFrom(src => src.pin))
            .ForMember(d => d.VRN, m => m.MapFrom(src => src.VehRegtNo))
            .ForMember(d => d.RegisteredDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB((src.VehRegDate))))
            .ForMember(d => d.VehicleMaker, m => m.MapFrom(src => src.SelectedVehMaker))
            .ForMember(d => d.Status, m => m.MapFrom(src => src.SelectedSts))
            .ForMember(d => d.XrefCardNo, m => m.MapFrom(src => Convert.ToInt64(src.XrefCardNo)))
            .ForMember(d => d.OdometerReading, m => m.MapFrom(src => Convert.ToInt32(src.OdoMeterReading)))
            .ForMember(d => d.OdometerUpdate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.OdoMeterUpdate)))
            .ForMember(d => d.CardExpiry, m => m.MapFrom(src => src.PolicyExpDate))
            .ForMember(d => d.RoadTaxExpiry, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.RoadTaxExpDate)))
            .ForMember(d => d.VehicleType, m => m.MapFrom(src => src.SelectedVehType))
            .ForMember(d => d.VehicleColor, m => m.MapFrom(src => src.SelectedVehColor))
            .ForMember(d => d.VehicleModel, m => m.MapFrom(src => src.SelectedVehModel))
            .ForMember(d => d.CardTerminated, m => m.MapFrom(src => src.CardTerminated))
            ;

            this.CreateMap <IssContactDTO, ContactLstModel>()
            .ForMember(d => d.RefTo, m => m.Ignore())
            .ForMember(d => d.RefCd, m => m.MapFrom(src => src.RefCd))
            .ForMember(d => d.SelectedContactType, m => m.MapFrom(src => src.ContactType))
            .ForMember(d => d.SelectedSts, m => m.MapFrom(src => src.ContactStatus))
            .ForMember(d => d.RawStatus, m => m.MapFrom(src => src.Status))
            .ForMember(d => d.SelectedOccupation, m => m.MapFrom(src => src.Occupation))
            .ForMember(d => d.RawOccupation, m => m.MapFrom(src => src.Occupation))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => src.CreationDate.HasValue ? NumberExtensions.DateConverter(src.CreationDate) : ""))
            ;
            this.CreateMap <ContactLstModel, IssContactDTO>()
            .ForMember(d => d.RefTo, m => m.Ignore())
            .ForMember(d => d.ContactType, m => m.MapFrom(src => src.SelectedContactType))
            .ForMember(d => d.ContactStatus, m => m.MapFrom(src => src.SelectedSts))
            .ForMember(d => d.Status, m => m.MapFrom(src => src.RawStatus))
            .ForMember(d => d.Function, m => m.MapFrom(src => src.SelectedOccupation))
            .ForMember(d => d.Occupation, m => m.MapFrom(src => src.RawOccupation))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.CreationDate)))
            ;
            this.CreateMap <WebAddressDTO, AddrListMaintModel>()
            .ForMember(d => d.State, m => m.Ignore())
            .ForMember(d => d.region, m => m.Ignore())
            .ForMember(d => d.Country, m => m.Ignore())
            .ForMember(d => d.SelectedAddrType, m => m.MapFrom(src => src.AddressType))
            .ForMember(d => d.MainMailingInd, m => m.MapFrom(src => NumberExtensions.BoolConverter(src.MainMailing)))
            .ForMember(d => d.SelectedMailInd, m => m.MapFrom(src => src.MainMailing))
            .ForMember(d => d.Address1, m => m.MapFrom(src => src.Street1))
            .ForMember(d => d.Address2, m => m.MapFrom(src => src.Street2))
            .ForMember(d => d.Address3, m => m.MapFrom(src => src.Street3))
            .ForMember(d => d.Address4, m => m.MapFrom(src => src.Street4))
            .ForMember(d => d.Address5, m => m.MapFrom(src => src.Street5))
            .ForMember(d => d.Selectedstate, m => m.MapFrom(src => src.StateCd))
            .ForMember(d => d.PostalCode, m => m.MapFrom(src => src.PostalCd))
            .ForMember(d => d.SelectedCountry, m => m.MapFrom(src => src.Country))
            .ForMember(d => d.selectedregion, m => m.MapFrom(src => src.Region))
            .ForMember(d => d.SelectedRefCd, m => m.MapFrom(src => src.RefCd))
            ;
            this.CreateMap <AddrListMaintModel, WebAddressDTO>()
            .ForMember(d => d.Country, m => m.Ignore())
            .ForMember(d => d.AddressType, m => m.MapFrom(src => src.SelectedAddrType))
            .ForMember(d => d.MainMailing, m => m.MapFrom(src => NumberExtensions.ConvertBoolDB(src.MainMailingInd)))
            .ForMember(d => d.Street1, m => m.MapFrom(src => src.Address1))
            .ForMember(d => d.Street2, m => m.MapFrom(src => src.Address2))
            .ForMember(d => d.Street3, m => m.MapFrom(src => src.Address3))
            .ForMember(d => d.Street4, m => m.MapFrom(src => src.Address4))
            .ForMember(d => d.Street5, m => m.MapFrom(src => src.Address5))
            .ForMember(d => d.StateCd, m => m.MapFrom(src => src.Selectedstate))
            .ForMember(d => d.PostalCd, m => m.MapFrom(src => src.PostalCode))
            .ForMember(d => d.Country, m => m.MapFrom(src => src.SelectedCountry))
            .ForMember(d => d.Region, m => m.MapFrom(src => src.selectedregion))
            .ForMember(d => d.RefCd, m => m.MapFrom(src => src.SelectedRefCd))
            ;

            this.CreateMap <GetAcctSignUpDTO, AcctSignUp>()
            .ForMember(d => d.PlasticType, m => m.Ignore())
            .ForMember(d => d.InvoicePref, m => m.Ignore())
            .ForMember(d => d.TaxCategory, m => m.Ignore())
            .ForMember(d => d.LangId, m => m.Ignore())
            .ForMember(d => d.ClientClass, m => m.Ignore())
            .ForMember(d => d.ClientType, m => m.Ignore())
            .ForMember(d => d.ReasonCd, m => m.Ignore())
            .ForMember(d => d.ApplicationId, m => m.MapFrom(src => src.ApplId))
            .ForMember(d => d.AcctNo, m => m.MapFrom(src => src.AccountNo.HasValue ? Convert.ToString(src.AccountNo) : ""))
            .ForMember(d => d.CompanyName, m => m.MapFrom(src => src.CompanyName))
            .ForMember(d => d.SelectedCorporateAcct, m => m.MapFrom(src => src.CorporateAccount))
            .ForMember(d => d.ApplicationRef, m => m.MapFrom(src => src.ApplRef))
            .ForMember(d => d.CreditLimit, m => m.MapFrom(src => decimal.Round(src.CreditLimit, 2, MidpointRounding.AwayFromZero)))
            .ForMember(d => d.ShownCreditLimit, m => m.MapFrom(src => decimal.Round(src.CreditLimit, 2, MidpointRounding.AwayFromZero)))
            .ForMember(d => d.PendingReasons, m => m.MapFrom(src => src.PendingReason))
            .ForMember(d => d.ApprovedDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.ApprovedDate)))
            .ForMember(d => d.ReceiveDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.ReceivedDate)))
            .ForMember(d => d.RejectedDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.RejectedDate)))
            .ForMember(d => d.SelectedLangId, m => m.MapFrom(src => src.PreferredLanguage))
            .ForMember(d => d.website, m => m.MapFrom(src => src.Website))
            .ForMember(d => d.CreationDatenUserid, m => m.ResolveUsing(model => new CreationDatenUserId()
            {
                UserId = model.UserId, CreationDate = CardTrend.Common.Extensions.NumberExtensions.DateConverter(model.CreationDate)
            }))
            ;
            this.CreateMap <MiscellaneousInfoDTO, MiscellaneousInfoModel>()
            .ForMember(d => d.Designation, m => m.Ignore())
            .ForMember(d => d.SelectedDesignation, m => m.MapFrom(src => src.Designation))
            .ForMember(d => d.AuthDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.AuthDate)))
            ;
            this.CreateMap <MiscellaneousInfoModel, MiscellaneousInfoDTO>()
            .ForMember(d => d.Designation, m => m.Ignore())
            .ForMember(d => d.Designation, m => m.MapFrom(src => src.SelectedDesignation))
            .ForMember(d => d.AuthDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.AuthDate)))
            ;
            this.CreateMap <SkdsDTO, SKDS>()
            .ForMember(d => d.Sts, m => m.Ignore())
            .ForMember(d => d.SubsidyLevel, m => m.Ignore())
            .ForMember(d => d.SubsidyType, m => m.Ignore())
            .ForMember(d => d.SKDSLitreQuota, m => m.MapFrom(src => src.Quota.HasValue ? NumberExtensions.CustomNumberFormat(String.Format("{0:0.00}", src.Quota)) : null))
            .ForMember(d => d.EffFromDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.EffFromDate)))
            .ForMember(d => d.EffToDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.EffToDate)))
            .ForMember(d => d.LastUpdDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.LastUpdateDate)))
            .ForMember(d => d.LastSubsidyDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.LastSubsidyDate)))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.CreationDate)))
            .ForMember(d => d.QuotaFromDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.QuotaFromDate)))
            .ForMember(d => d.QuotaToDate, m => m.MapFrom(src => NumberExtensions.DateConverter(src.QuotaToDate)))
            .ForMember(d => d.Refference, m => m.MapFrom(src => src.Reference))
            .ForMember(d => d.SelectedSts, m => m.MapFrom(src => src.Status))
            .ForMember(d => d.SelectedSubsidyLevel, m => m.MapFrom(src => src.SubsidyLevel))
            ;
            this.CreateMap <SKDS, SkdsDTO>()
            .ForMember(d => d.SubsidyLevel, m => m.Ignore())
            .ForMember(d => d.Quota, m => m.MapFrom(src => NumberExtensions.ConvertDecimalToDb(src.SKDSLitreQuota)))
            .ForMember(d => d.EffFromDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.EffFromDate)))
            .ForMember(d => d.EffToDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.EffToDate)))
            .ForMember(d => d.LastUpdateDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.LastUpdDate)))
            .ForMember(d => d.LastSubsidyDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.LastSubsidyDate)))
            .ForMember(d => d.CreationDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.CreationDate)))
            .ForMember(d => d.QuotaFromDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.QuotaFromDate)))
            .ForMember(d => d.QuotaToDate, m => m.MapFrom(src => NumberExtensions.DateConverterDB(src.QuotaToDate)))
            .ForMember(d => d.Reference, m => m.MapFrom(src => src.Refference))
            .ForMember(d => d.Status, m => m.MapFrom(src => src.SelectedSts))
            .ForMember(d => d.SubsidyLevel, m => m.MapFrom(src => src.SelectedSubsidyLevel))
            ;
        }