예제 #1
0
        public override JobStatus Start(JobParams JP, out string ErrorMsg)
        {
            ErrorMsg = "";
            logger.Info("-------------Starting NAV Download-------------");

            DownloadLogVo downloadLogVo = new DownloadLogVo();

            downloadLogVo.ID = DownloadLog.Add();

            if (downloadLogVo.ID > 0)
            {
                HttpDownLoad dn = new HttpDownLoad();
                DownloadTask dt = new DownloadTask(TaskType.MutualFund);
                if (dn.ExecuteDownLoadTask(dt, downloadLogVo))
                {
                    NAVUpload navUpload = new NAVUpload();
                    navUpload.CopyDataToWERPTempTable();
                    navUpload.UpdateWERPSchemeCode();
                    downloadLogVo.RejectedSchemesCount = navUpload.MoveRejectedRecords(downloadLogVo.ID);
                    DownloadLog.Update(downloadLogVo);
                    downloadLogVo.UpdatedSchemesCount      = navUpload.UpdateSnapshot();
                    downloadLogVo.Is_WERP_Snapshot_Updated = true;
                    DownloadLog.Update(downloadLogVo);
                    //navUpload.UpdateHistoryTable();
                }
            }
            logger.Info("-------------NAV Update Ends-------------");

            return(JobStatus.SuccessFull);
        }
예제 #2
0
        static void Main(string[] args)
        {
            logger.Info("-------------Starting NAV Download-------------");

            DownloadLogVo downloadLogVo = new DownloadLogVo();

            downloadLogVo.ID = DownloadLog.Add();

            if (downloadLogVo.ID > 0)
            {
                HttpDownLoad dn = new HttpDownLoad();
                DownloadTask dt = new DownloadTask(TaskType.MutualFund);
                if (dn.ExecuteDownLoadTask(dt, downloadLogVo))
                {
                    NAVUpload navUpload = new NAVUpload();
                    navUpload.CopyDataToWERPTempTable();
                    navUpload.UpdateWERPSchemeCode();
                    downloadLogVo.RejectedSchemesCount = navUpload.MoveRejectedRecords(downloadLogVo.ID);
                    DownloadLog.Update(downloadLogVo);
                    downloadLogVo.UpdatedSchemesCount      = navUpload.UpdateSnapshot();
                    downloadLogVo.Is_WERP_Snapshot_Updated = true;
                    DownloadLog.Update(downloadLogVo);
                    //navUpload.UpdateHistoryTable();
                }
            }
            logger.Info("-------------NAV Update Ends-------------");
        }