Esempio n. 1
0
        public async Task <AcctSOASummSelectResponse> GetAcctSOASummSelect(string acctNo)
        {
            Logger.Info("Invoking GetAcctSOASummSelect function");
            var response = new AcctSOASummSelectResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var accountSOAOpDAO = scope.Resolve <IAccountSOAOpDAO>();
                    var result          = await accountSOAOpDAO.WebAcctSOASummSelect(acctNo);

                    response.acctSOASummary = result;
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetAcctSOASummSelect: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Esempio n. 2
0
        /*************************************
        *  Created by:   dandy boy
        *  Created on:   june 28, 2017
        *  Function:     GetUserAccessModuleList
        *  Purpose:      GetUserAccessModuleList
        *  Inputs:       userId,level
        *  Returns:      SecurityOpResponse
        *************************************/
        public SecurityOpResponse GetUserAccessModuleList(string userId, string level)
        {
            Logger.Info("Invoking GetUserAccessListSelect function");
            var response = new SecurityOpResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var securityOpDAO = scope.Resolve <ISecurityOpDAO>();
                    var results       = securityOpDAO.WebGetUserAccessModuleList(userId, level);
                    if (results.Count() > 0)
                    {
                        response.webModules = Mapper.Map <List <UserAccessLevelDTO>, List <WebModule> >(results);
                    }
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetUserAccessModuleList: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Esempio n. 3
0
        /*************************************
        *  Created by:   Tuan Tran
        *  Created on:   March 20, 2017
        *  Function:     GetPukalAccounts
        *  Purpose:      GetPukalAccounts
        *  Inputs:       refCode,acctofficeCd,cycStmtId
        *  Returns:      PukalPaymentResponse
        *************************************/
        public async Task <PukalPaymentResponse> GetPukalAccounts(string refcd, string acctOfficeCd, Int64 cycStmtId)
        {
            Logger.Info("Invoking GetPukalAccounts function");
            var response = new PukalPaymentResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var pukalAcctOpDAO = scope.Resolve <IPukalAcctOpDAO>();
                    var pukals         = await pukalAcctOpDAO.GetPukalAccountList(refcd, acctOfficeCd, cycStmtId);

                    if (pukals.Count() > 0)
                    {
                        response.pukalPayments = Mapper.Map <IList <PukalPaymentDTO>, IList <PukalAcctBatchList> >(pukals);
                    }
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetPukalAccounts: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Esempio n. 4
0
        /*************************************
        *  Created by:   Tuan Tran
        *  Created on:   april 3, 2017
        *  Function:     GetFraudCases
        *  Purpose:      GetFraudCases
        *  Inputs:
        *  Returns:      PukalAcctResponse
        *************************************/
        public async Task <FraudResponse> GetFraudCases()
        {
            Logger.Info("Invoking GetFraudCases fuction use EF to call SP");
            var response = new FraudResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var pukalAcctDAO = scope.Resolve <IFraudOpDAO>();
                    var ftFrauds     = await pukalAcctDAO.FtFraudCaseList();

                    if (ftFrauds.Count() > 0)
                    {
                        response.fraudCases = Mapper.Map <List <FraudCaseDTO>, List <FraudCaseListViewModel> >(ftFrauds);
                    }
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetFraudCases: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Esempio n. 5
0
        /*************************************
        *  Created by:   Tuan Tran
        *  Created on:   Mar 6, 2017
        *  Function:     GetCorpAcctDetail
        *  Purpose:      GetCorpAcctDetail
        *  Inputs:       CorpCd
        *  Returns:      CorporateResponse
        *************************************/
        public async Task <CorporateResponse> GetCorpAcctDetail(string CorpCd)
        {
            Logger.Info("Invoking GetCorpAcctDetail fuction use EF to call SP");
            var response = new CorporateResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var coporateDAO = scope.Resolve <ICorporateOpDAO>();
                    var result      = await coporateDAO.GetCorpAcctDetail(CorpCd);

                    if (result != null)
                    {
                        response.coporate = Mapper.Map <CorporateDTO, Corporate>(result);
                    }
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetCorpAcctDetail: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
        /*************************************
        *  Created by:   dandy boy
        *  Created on:   March 24, 2017
        *  Function:     GetAccountTransactionSearch
        *  Purpose:      GetAccountTransactionSearch
        *  Inputs:
        *  Returns:      TransactionSearchResponse
        *************************************/
        public async Task <TransactionSearchResponse> GetAccountTransactionSearch(Int64?accountNo, Int64?cardNo, string transacionCategory, int txtCd, string fromDate, string toDate, string statementDate)
        {
            Logger.Info("Invoking GetAccountTransactionSearch function");
            var response = new TransactionSearchResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var    transacionSearchDAO = scope.Resolve <ITransactionSearchDAO>();
                    string frDate  = (string)NumberExtensions.ConvertDatetimeDB(fromDate);
                    string tDate   = (string)NumberExtensions.ConvertDatetimeDB(toDate);
                    var    results = await transacionSearchDAO.GetAccountTxnSearch(accountNo, cardNo, transacionCategory, txtCd, frDate, tDate, statementDate);

                    if (results.Count() > 0)
                    {
                        response.transactionSearches = Mapper.Map <IList <TransactionSearchDTO>, IList <AcctPostedTxnSearch> >(results);
                    }
                }
                response.Status = ResponseStatus.Success;
            }catch (Exception ex)
            {
                string msg = string.Format("Error in GetAccountTransactionSearch: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Esempio n. 7
0
        /*************************************
        *  Created by:   dandy boy
        *  Created on:   April 21, 2017
        *  Function:     GetNtfyEventSearch
        *  Purpose:      GetNtfyEventSearch
        *  Inputs:       evtInd,eventType,refTo,refKey,startDate,endDate
        *  Returns:      NotificationSearchResponse
        *************************************/
        public async Task <NotificationSearchResponse> GetNtfyEventSearch(string evtInd, string eventType, string refTo, string refKey, string startDate, string endDate)
        {
            Logger.Info("Invoking GetNtfyEventSearch function");
            var response = new NotificationSearchResponse()
            {
                Status = ResponseStatus.Failure
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var    notificationSearchDAO = scope.Resolve <INotifSearchDAO>();
                    string frDate  = DateTime.ParseExact(startDate, "dd/MM/yyyy", null).ToShortDateString();
                    string toDate  = DateTime.ParseExact(endDate, "dd/MM/yyyy", null).ToShortDateString();
                    var    results = await notificationSearchDAO.WebNtfyEventSearch(evtInd, eventType, refTo, refKey, frDate, toDate);

                    if (results.Count() > 0)
                    {
                        response.lookupParameters = Mapper.Map <IList <NtfyEventSearchDTO>, IList <LookupParameters> >(results);
                    }
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetNtfyEventSearch: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Esempio n. 8
0
        /*************************************
        *  Created by:   Tuan Tran
        *  Created on:   June 08, 2017
        *  Function:     GetApplicantInfo
        *  Purpose:      GetApplicantInfo
        *  Inputs:       applidData,appcidData,acctNo
        *  Returns:      ApplicantSignUpResponse
        *************************************/
        public async Task <ApplicantSignUpResponse> GetApplicantInfo(string applidData, string appcidData, string acctNo)
        {
            Logger.Info("Invoking GetApplicantInfo function");
            var response = new ApplicantSignUpResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var applicantSignUpDAO = scope.Resolve <IApplicantSignUpDAO>();
                    var result             = await applicantSignUpDAO.GetApplicantInfo(applidData, appcidData, acctNo);

                    if (result != null)
                    {
                        response.cardAppcInfo = Mapper.Map <CardAppcInfoDTO, CardAppcInfoModel>(result);
                    }
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetApplicantInfo: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Esempio n. 9
0
        /*************************************
        *   Created by:   Tuan Tran
        *   Created on:   March 14, 2017
        *   Function:     GetPinMailerBatchList
        *   Purpose:      GetPinMailerBatchList
        *   Inputs:
        *   Returns:      PinMailerBatchResponse
        *************************************/
        public async Task <PinMailerBatchResponse> GetPinMailerBatchList()
        {
            Logger.Info("Invoking GetPinMailerBatchList function");
            var response = new PinMailerBatchResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var pinMailer = scope.Resolve <IPinMailerOpDAO>();
                    var result    = await pinMailer.GetPinMailerBatch();

                    if (result.Count() > 0)
                    {
                        response.pinMailerBatchs = Mapper.Map <IList <PinMailerBatchDTO>, IList <PinMailerBatchList> >(result);
                    }
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetPinMailerBatchList: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Esempio n. 10
0
        public async Task <UserAccessResponse> GetUserTitleList()
        {
            Logger.Info("Invoking GetUserTitleList fuction use EF to call SP");
            var response = new UserAccessResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var userAccessDAO = scope.Resolve <IUserAccessDAO>();
                    var results       = await userAccessDAO.GetUserTitles();

                    response.userTitles = results;
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetUserTitleList: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Esempio n. 11
0
        /*************************************
        *  Created by:   dandy boy
        *  Created on:   March 21, 2017
        *  Function:     GetMerchantMultiTxnAdjustmentList
        *  Purpose:      GetMerchantMultiTxnAdjustmentList
        *  Inputs:
        *  Returns:      MerchMultitxnAdjustmentResponse
        *************************************/
        public async Task <MerchMultitxnAdjustmentResponse> GetMerchantMultiTxnAdjustmentList()
        {
            Logger.Info("Invoking GetMerchantMultiTxnAdjustmentList function");
            var response = new MerchMultitxnAdjustmentResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var merchMultitxnAdjustmentDAO = scope.Resolve <IMerchMultitxnAdjustmentDAO>();
                    var results = await merchMultitxnAdjustmentDAO.MerchantMultiTxnAdjustmentListSelect();

                    if (results.Count() > 0)
                    {
                        response.txtAdjustments = Mapper.Map <List <MerchantMultiTxnAdjustmentDTO>, List <TxnAdjustment> >(results);
                    }
                }
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetMerchantMultiTxnAdjustmentList: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Esempio n. 12
0
        /*************************************
        *  Created by:   Tuan Tran
        *  Created on:   Mar 6, 2017
        *  Function:     GetAllAcctCollection
        *  Purpose:      GetAllAcctCollection
        *  Inputs:       collectionTaskDTO class
        *  Returns:      GetAllAcctCollectionResponse
        *************************************/
        public async Task <GetAllAcctCollectionResponse> GetAllAcctCollection(CollectionTaskListViewModel collectionTaskModel)
        {
            Logger.Info("Invoking GetAllAcctCollection function");
            var response = new GetAllAcctCollectionResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var collectionTaskDAO = scope.Resolve <ICollectionOpDAO>();
                    var collectionTask    = Mapper.Map <CollectionTaskListViewModel, CollectionTaskDTO>(collectionTaskModel);
                    var results           = await collectionTaskDAO.GetAllAcctCollection(collectionTask);

                    if (results.Count() > 0)
                    {
                        response.collectionTasks = Mapper.Map <IList <CollectionTaskDTO>, IList <CollectionTaskListViewModel> >(results);
                    }
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetAllAcctCollection: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Esempio n. 13
0
 public object GetReportViewer(ReportViewerDTO rpt)
 {
     Logger.Info("Invoking GetReportViewer function");
     try
     {
         using (var scope = Container.BeginLifetimeScope())
         {
             var reportpDAO = scope.Resolve <IReportOpDAO>();
             var result     = reportpDAO.GetReport(rpt);
             return(result);
         }
     }
     catch (Exception ex)
     {
         string msg = string.Format("Error in GetReportViewer: detail:{0}", ex.Message);
         Logger.Error(msg, ex);
     }
     return(null);
 }
Esempio n. 14
0
        /*************************************
        *  Created by:   Tuan Tran
        *  Created on:   March 5, 2017
        *  Function:     WebMultiPaymentListSelect
        *  Purpose:      WebMultiPaymentListSelect
        *  Inputs:
        *  Returns:      MultiPaymentResponse
        *************************************/
        public async Task <MultiPaymentResponse> WebMultiPaymentListSelect()
        {
            Logger.Info("Invoking WebMultiPaymentListSelect function");
            var response = new MultiPaymentResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var multiPaymentOpDAO = scope.Resolve <IMultiPaymentOpDAO>();
                    var results           = await multiPaymentOpDAO.WebMultiPaymentListSelect();

                    if (results.Count() > 0)
                    {
                        response.multiPayments = Mapper.Map <IList <MultiPaymentDTO>, IList <MultiPayment> >(results);
                    }
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in WebMultiPaymentListSelect: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Esempio n. 15
0
        /*************************************
        *  Created by:   Tuan Tran
        *  Created on:   April 18, 2017
        *  Function:     GetNotifyEventConfDetails
        *  Purpose:      GetNotifyEventConfDetails
        *  Inputs:       userId
        *  Returns:      EventConfigResponse
        *************************************/
        public async Task <EventConfigResponse> GetNotifyEventConfDetails(string userId)
        {
            Logger.Info("Invoking GetNotifyEventConfDetails fuction use EF to call SP");
            var response = new EventConfigResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var eventConfigDAO = scope.Resolve <IEventConfigDAO>();
                    var results        = await eventConfigDAO.GetNtfyEvtConfListSelect(userId);

                    if (results.Count() > 0)
                    {
                        response.lookupParameters = Mapper.Map <List <WebNtfyEvtConfDetailDTO>, List <LookupParameters> >(results);
                    }
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetNotifyEventConfDetails: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Esempio n. 16
0
        /*************************************
        *  Created by:   dandy
        *  Created on:  May 22, 2017
        *  Function:     GetGeneralInfo
        *  Purpose:      GetGeneralInfo
        *  Inputs:       cardNo
        *  Returns:      CardHolderResponse
        *************************************/
        public async Task <CardHolderResponse> GetGeneralInfo(string cardNo)
        {
            Logger.Info("Invoking GetCardList fuction use EF to call SP");
            var response = new CardHolderResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var applicantHolderDAO = scope.Resolve <ICardHolderDAO>();
                    var cardHolderInfo     = await applicantHolderDAO.GeneralInfoSelect(cardNo);

                    if (cardHolderInfo != null)
                    {
                        cardHolderInfo.CardNo   = cardNo;
                        response.cardHolderInfo = Mapper.Map <CardHolderInfoDTO, CardHolderInfoModel>(cardHolderInfo);
                    }
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetCardList: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Esempio n. 17
0
        /*************************************
        *  Created by:   Tuan Tran
        *  Created on:   March 3, 2017
        *  Function:     GetMerchAgreementList
        *  Purpose:      GetMerchAgreementList
        *  Inputs:
        *  Returns:      MechSignUpResponse
        *************************************/
        public async Task <MechSignUpResponse> GetMerchAgreementList()
        {
            Logger.Info("Invoking GetMerchAgreementList function");
            var response = new MechSignUpResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var mechSignUpDAO = scope.Resolve <IMechSignUpDAO>();
                    var result        = await mechSignUpDAO.GetMerchAgreementList();

                    if (result.Count() > 0)
                    {
                        response.merchAgreements = Mapper.Map <IList <MerchAgreementGeneralInfoDTO>, IList <MA_GeneralInfo> >(result);
                    }
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetMerchAgreementList: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
        /*************************************
        *  Created by:   Tuan Tran
        *  Created on:   March 2, 2017
        *  Function:     GetManualSlipEntryBatchList
        *  Purpose:      GetManualSlipEntryBatchList
        *  Inputs:
        *  Returns:      PinMailerBatchResponse
        *************************************/
        public ManualSlipEntryResponse GetManualSlipEntryBatchList()
        {
            Logger.Info("Invoking GetManualSlipEntryBatchList fuction use EF to call SP");
            var response = new ManualSlipEntryResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var manualSlipEntryOpDAO = scope.Resolve <IManualSlipEntryOpDAO>();
                    var results = manualSlipEntryOpDAO.GetManualSlipEntryBatchList();
                    if (results.Count() > 0)
                    {
                        response.merchManualTxns = Mapper.Map <IList <ManualSlipEntryDTO>, IList <ManualSlipEntry> >(results);
                    }
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetManualSlipEntryBatchList: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }
Esempio n. 19
0
        /*************************************
        *  Created by:   Tuan Tran
        *  Created on:   March 8, 2017
        *  Function:     WebUndefinedProdType
        *  Purpose:      WebUndefinedProdType
        *  Inputs:
        *  Returns:      LookupParameterListResponse
        *************************************/
        public async Task <LookupParameterListResponse> WebUndefinedProdType()
        {
            Logger.Info("Invoking WebUndefinedProdType function");
            var response = new LookupParameterListResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var globalVariableOpDAO = scope.Resolve <IGlobalVariableOpDAO>();
                    var result = await globalVariableOpDAO.WebUndefinedProdType();

                    if (result.Count() > 0)
                    {
                        response.lookupParameters = Mapper.Map <IList <LookupParameterDTO>, IList <LookupParameters> >(result);
                    }
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in WebUndefinedProdType: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response);
        }