Exemple #1
0
        private bool TradeAccountStagingInsertion(int ProcessId, out int countTransactionsInserted, out int countRejectedRecords)
        {
            bool blResult = false;

            processlogVo    = new UploadProcessLogVo();
            uploadsCommonBo = new UploadCommonBo();
            werpUploadBo    = new WerpUploadsBo();

            countTransactionsInserted = 0;
            countRejectedRecords      = 0;

            processlogVo = uploadsCommonBo.GetProcessLogInfo(ProcessId);
            WerpEQUploadsBo werpEQUploadsBo = new WerpEQUploadsBo();
            // WERP Insertion
            string packagePath = Server.MapPath("\\UploadPackages\\EQTradeAccountUploadPackage\\EQTradeAccountUploadPackage\\EQTradeAccountUploadPackage\\UploadChecksOnEQTradeStaging.dtsx");
            bool   WERPEQSecondStagingCheckResult = werpEQUploadsBo.WERPEQProcessDataInSecondStagingTradeAccount(ProcessId, packagePath, configPath, adviserVo.advisorId);

            if (WERPEQSecondStagingCheckResult)
            {
                packagePath = Server.MapPath("\\UploadPackages\\EQTradeAccountUploadPackage\\EQTradeAccountUploadPackage\\EQTradeAccountUploadPackage\\UploadEQTradeStagingToWerp.dtsx");
                bool WERPEQTradeWerpResult = werpEQUploadsBo.WERPEQInsertTradeAccountDetails(ProcessId, packagePath, configPath);

                if (WERPEQTradeWerpResult)
                {
                    processlogVo.IsInsertionToWERPComplete = 1;
                    processlogVo.NoOfAccountsInserted      = uploadsCommonBo.GetAccountsUploadCount(ProcessId, "WPEQ");
                    processlogVo.NoOfRejectedRecords       = uploadsCommonBo.GetAccountsUploadRejectCount(ProcessId, "WPEQ");
                    processlogVo.EndTime = DateTime.Now;
                    bool updateProcessLog = uploadsCommonBo.UpdateUploadProcessLog(processlogVo);

                    if (updateProcessLog)
                    {
                        blResult = true;
                    }
                }
            }

            return(blResult);
        }