Example #1
0
        public void PrepareFilesForDailyReport(DateTime generateDate)
        {
            String   dweek          = generateDate.DayOfWeek.ToString();
            DateTime priorWeekDate  = generateDate.AddDays(-8);
            DateTime priorWeekDateS = generateDate.AddDays(-10);
            DateTime FridayDate     = generateDate.AddDays(-3);
            DateTime dTodayLinkDate = generateDate.AddDays(-1);

            DateTime rTodayLinkDate = dweek == "Monday" ? generateDate.AddDays(-4) : generateDate.AddDays(-2);

            string tldDate   = dTodayLinkDate.ToString("yyyyMMdd");
            string tlrDate   = rTodayLinkDate.ToString("yyyyMMdd");
            string pWeekDate = priorWeekDate.ToString("yyyyMMdd");
            string rDatey    = rTodayLinkDate.Year.ToString();
            string rDatem    = rTodayLinkDate.ToString("MM");
            string rDated    = rTodayLinkDate.ToString("dd");
            string dDatey    = dTodayLinkDate.Year.ToString();
            string dDatem    = dTodayLinkDate.ToString("MM");
            string dDated    = dTodayLinkDate.ToString("dd");

            ExcelHelper excelHelper = new ExcelHelper();

            //export today link
            string ssisPathTodaylink      = packagePath + "todaylink.dtsx";
            string excelFullNameTodaylink = excelHelper.getFilenamePF(generateDate) + @"\" + dDatem + dDated + dDatey + "(Exclude Closed Before 6302009).xls";

            excelHelper.ExportDataBySSIS(ssisPathTodaylink, excelFullNameTodaylink);

            //export Tricare dump
            string ssisPathTricareDaily      = packagePath + "tricaredaily.dtsx";
            string excelFullNameTricareDaily = excelHelper.getFilenamePF(generateDate) + @"\" + "Track Wise Dump-" + dDatem + dDated + dDatey + ".xls";

            excelHelper.ExportDataBySSIS(ssisPathTricareDaily, excelFullNameTricareDaily);

            //Annuity and Ebusiness report
            File.Copy(finalReportsPath + tldDate + @"\" + "Annuity and EBusiness-" + dDatem + dDated + ".xls", excelHelper.getFilenamePF(generateDate) + @"\" + "Annuity and EBusiness-" + dDatem + dDated + ".xls", true);

            ////business surpport backlog report
            File.Copy(finalReportsPath + tldDate + @"\" + "Service and TricareDaily-" + dDatem + dDated + ".xls", excelHelper.getFilenamePF(generateDate) + @"\" + "Service and TricareDaily-" + dDatem + dDated + ".xls", true);

            ////service remedy group level report
            File.Copy(finalReportsPath + tldDate + @"\" + "Service Remedy Group Level Report-" + dDatem + dDated + ".xls", excelHelper.getFilenamePF(generateDate) + @"\" + "Service Remedy Group Level Report-" + dDatem + dDated + ".xls", true);

            ////ebusiness dump
            File.Copy(finalReportsPath + tldDate + @"\" + "EBusiness ticket-" + dDatem + dDated + ".xls", excelHelper.getFilenamePF(generateDate) + @"\" + "EBusiness ticket-" + dDatem + dDated + dDatey + ".xls", true);

            ////annuity backlog dump
            File.Copy(finalReportsPath + tldDate + @"\" + "Annuity ticket-" + dDatem + dDated + ".xls", excelHelper.getFilenamePF(generateDate) + @"\" + "Annuity ticket-" + dDatem + dDated + dDatey + ".xls", true);

            System.Diagnostics.Process.Start("explorer.exe", excelHelper.getFilenamePF(generateDate));
        }
Example #2
0
        /// <summary>
        /// Prepare file for tricare Monday
        /// </summary>
        /// <param name="generateDate"></param>
        public void PrepareFilesForRADTricareMonday(DateTime generateDate)
        {
            DateTime endDay   = generateDate.AddDays(-1);
            DateTime startDay = generateDate.AddDays(-9);

            string endDateStr           = endDay.ToString("yyyyMMdd");
            string startDateStr         = startDay.ToString("yyyyMMdd");
            string priorGenerateDateStr = startDateStr;

            //TRICATE Team Weekly-demo.xls
            //excelHelper.SaveReportFile(saveFullPath,excelHelper.getFilenameByArg(-1, "Track Weekly(Thursday)") + @"\" + "TRICARE Team Weekly Report -" + startDate + "-" + endDate + ".xlsx");
            // TRICARE Weekly dump(thursdat)
            string ssisPathTricareThursday      = packagePath + "tricateWeeklyThursday.dtsx";
            string excelFullNameTricareThursday = trackWeekly1Path + endDateStr + @"\" + "Tricare Monday Weekly Dump-" + startDateStr + "-" + endDateStr + ".xls";
            string excelTricarePaht             = trackWeekly1Path + endDateStr;

            if (!Directory.Exists(excelTricarePaht))
            {
                Directory.CreateDirectory(excelTricarePaht);
            }
            ExcelHelper excelHelper = new ExcelHelper();

            excelHelper.ExportDataBySSIS(ssisPathTricareThursday, excelFullNameTricareThursday);

            System.Diagnostics.Process.Start("explorer.exe", trackWeekly1Path + endDateStr);
        }
Example #3
0
        public void PrepareFilesForTricareRpt(DateTime generateDate)
        {
            DateTime endDay      = generateDate.AddDays(-1);
            DateTime startDay    = generateDate.AddDays(-7);
            DateTime priorEndDay = generateDate.AddDays(-8);

            string endDateStr           = endDay.ToString("yyyyMMdd");
            string startDateStr         = startDay.ToString("yyyyMMdd");
            string priorEndDateStr      = priorEndDay.ToString("yyyyMMdd");
            string priorGenerateDateStr = startDateStr;

            //TRICATE Team Weekly-demo.xls
            //excelHelper.SaveReportFile(saveFullPath,excelHelper.getFilenameByArg(-1, "Track Weekly(Thursday)") + @"\" + "TRICARE Team Weekly Report -" + startDate + "-" + endDate + ".xlsx");
            // TRICARE Weekly dump(thursdat)
            string packagePath                  = System.IO.Directory.GetCurrentDirectory().ToString().Replace(@"bin\Debug", @"SSISPackage\");//获取SSISPackage的目录。
            string ssisPathTricareThursday      = packagePath + "tricateWeeklyThursday.dtsx";
            string excelFullNameTricareThursday = trackWeekly4Path + endDateStr + @"\" + "Track Wise Weekly Dump-" + startDateStr + "-" + endDateStr + ".xls";
            string excelTricarePaht             = trackWeekly4Path + endDateStr;

            if (!Directory.Exists(excelTricarePaht))
            {
                Directory.CreateDirectory(excelTricarePaht);
            }
            ExcelHelper excelHelper = new ExcelHelper();

            excelHelper.ExportDataBySSIS(ssisPathTricareThursday, excelFullNameTricareThursday);

            ////handle tricare report sheet
            //string priorReportPath = trackWeekly4Path + priorEndDateStr + @"\Tricare Benchmark Report -" + startDateStr + ".xls";
            //string ReportPath = trackWeekly4Path + endDateStr + @"\Tricare Benchmark Report -" + generateDate.ToString("yyyyMMdd") + ".xls";
            //File.Copy(priorReportPath, ReportPath,true);
            //_ExcelApp = new Microsoft.Office.Interop.Excel.Application();
            //_ExcelWBook.CheckCompatibility = false;//Add for Diable Compatibility for saving excel
            //_ExcelWBook = (_Workbook)(_ExcelApp.Workbooks.Open(ReportPath, Missing.Value, Missing.Value
            //            , Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,
            //            Missing.Value, Missing.Value, Missing.Value));
            //_Worksheet worksheet = _ExcelWBook.Worksheets["Dashboard"];
            //worksheet.get_Range("E3", "I58").Value = null;
            //worksheet.get_Range("D3", "D58").Copy(Type.Missing);
            //worksheet.get_Range("I3", "I3").PasteSpecial(Microsoft.Office.Interop.Excel.XlPasteType.xlPasteValues, Microsoft.Office.Interop.Excel.XlPasteSpecialOperation.xlPasteSpecialOperationNone,
            //    Type.Missing , Type.Missing );
            //worksheet.get_Range("D3", "D58").Value = null;
            //_ExcelWBook.Save();
            //_ExcelWBook.Close();
            //_ExcelApp.Quit();

            System.Diagnostics.Process.Start("explorer.exe", trackWeekly4Path + endDateStr);
        }
Example #4
0
        /// <summary>
        /// Prepare file for tricare Monday
        /// </summary>
        /// <param name="generateDate"></param>
        public void PrepareFilesForCorpTricareMonday(DateTime generateDate)
        {
            DateTime endDay   = generateDate.AddDays(-3);
            DateTime startDay = generateDate.AddDays(-9);

            string endDateStr           = endDay.ToString("yyyyMMdd");
            string startDateStr         = startDay.ToString("yyyyMMdd");
            string priorGenerateDateStr = startDateStr;

            string ssisPathCorpTricare      = packagePath + "tricateCorpWeeklyMonday.dtsx";
            string excelCorpTricarePath     = corpTrackWeekly1Path + startDay.ToString("MMdd") + "-" + endDay.ToString("MMdd");
            string excelFullNameCorpTricare = excelCorpTricarePath + @"\" + "Corp Tricare Weekly New dump " + startDateStr + "-" + endDateStr + ".xls";

            if (!Directory.Exists(excelCorpTricarePath))
            {
                Directory.CreateDirectory(excelCorpTricarePath);
            }
            ExcelHelper excelHelper = new ExcelHelper();

            excelHelper.ExportDataBySSIS(ssisPathCorpTricare, excelFullNameCorpTricare);

            System.Diagnostics.Process.Start("explorer.exe", excelCorpTricarePath);
        }
Example #5
0
        public void PrepareFilesForTricareRpt(DateTime generateDate)
        {
            DateTime endDay = generateDate.AddDays(-1);
              DateTime startDay = generateDate.AddDays(-7);
              DateTime priorEndDay = generateDate.AddDays(-8);

              string endDateStr = endDay.ToString("yyyyMMdd");
              string startDateStr = startDay.ToString("yyyyMMdd");
              string priorEndDateStr = priorEndDay.ToString("yyyyMMdd");
              string priorGenerateDateStr = startDateStr;

              //TRICATE Team Weekly-demo.xls
              //excelHelper.SaveReportFile(saveFullPath,excelHelper.getFilenameByArg(-1, "Track Weekly(Thursday)") + @"\" + "TRICARE Team Weekly Report -" + startDate + "-" + endDate + ".xlsx");
              // TRICARE Weekly dump(thursdat)
              string packagePath = System.IO.Directory.GetCurrentDirectory().ToString().Replace(@"bin\Debug", @"SSISPackage\");//获取SSISPackage的目录。
              string ssisPathTricareThursday = packagePath + "tricateWeeklyThursday.dtsx";
              string excelFullNameTricareThursday = trackWeekly4Path + endDateStr + @"\" + "Track Wise Weekly Dump-" + startDateStr + "-" + endDateStr + ".xls";
              string excelTricarePaht = trackWeekly4Path + endDateStr;
              if (!Directory.Exists(excelTricarePaht))
              {
              Directory.CreateDirectory(excelTricarePaht);
              }
              ExcelHelper excelHelper = new ExcelHelper();
              excelHelper.ExportDataBySSIS(ssisPathTricareThursday, excelFullNameTricareThursday);

              ////handle tricare report sheet
              //string priorReportPath = trackWeekly4Path + priorEndDateStr + @"\Tricare Benchmark Report -" + startDateStr + ".xls";
              //string ReportPath = trackWeekly4Path + endDateStr + @"\Tricare Benchmark Report -" + generateDate.ToString("yyyyMMdd") + ".xls";
              //File.Copy(priorReportPath, ReportPath,true);
              //_ExcelApp = new Microsoft.Office.Interop.Excel.Application();
              //_ExcelWBook.CheckCompatibility = false;//Add for Diable Compatibility for saving excel
              //_ExcelWBook = (_Workbook)(_ExcelApp.Workbooks.Open(ReportPath, Missing.Value, Missing.Value
              //            , Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,
              //            Missing.Value, Missing.Value, Missing.Value));
              //_Worksheet worksheet = _ExcelWBook.Worksheets["Dashboard"];
              //worksheet.get_Range("E3", "I58").Value = null;
              //worksheet.get_Range("D3", "D58").Copy(Type.Missing);
              //worksheet.get_Range("I3", "I3").PasteSpecial(Microsoft.Office.Interop.Excel.XlPasteType.xlPasteValues, Microsoft.Office.Interop.Excel.XlPasteSpecialOperation.xlPasteSpecialOperationNone,
              //    Type.Missing , Type.Missing );
              //worksheet.get_Range("D3", "D58").Value = null;
              //_ExcelWBook.Save();
              //_ExcelWBook.Close();
              //_ExcelApp.Quit();

              System.Diagnostics.Process.Start("explorer.exe", trackWeekly4Path + endDateStr);
        }
Example #6
0
        /// <summary>
        /// Prepare file for tricare Monday
        /// </summary>
        /// <param name="generateDate"></param>
        public void PrepareFilesForRADTricareMonday(DateTime generateDate)
        {
            DateTime endDay = generateDate.AddDays(-1);
              DateTime startDay = generateDate.AddDays(-9);

              string endDateStr = endDay.ToString("yyyyMMdd");
              string startDateStr = startDay.ToString("yyyyMMdd");
              string priorGenerateDateStr = startDateStr;

              //TRICATE Team Weekly-demo.xls
              //excelHelper.SaveReportFile(saveFullPath,excelHelper.getFilenameByArg(-1, "Track Weekly(Thursday)") + @"\" + "TRICARE Team Weekly Report -" + startDate + "-" + endDate + ".xlsx");
              // TRICARE Weekly dump(thursdat)
              string ssisPathTricareThursday = packagePath + "tricateWeeklyThursday.dtsx";
              string excelFullNameTricareThursday = trackWeekly1Path + endDateStr + @"\" + "Tricare Monday Weekly Dump-" + startDateStr + "-" + endDateStr + ".xls";
              string excelTricarePaht = trackWeekly1Path + endDateStr;
              if (!Directory.Exists(excelTricarePaht))
              {
              Directory.CreateDirectory(excelTricarePaht);
              }
              ExcelHelper excelHelper = new ExcelHelper();
              excelHelper.ExportDataBySSIS(ssisPathTricareThursday, excelFullNameTricareThursday);

              System.Diagnostics.Process.Start("explorer.exe", trackWeekly1Path + endDateStr);
        }
Example #7
0
        public void PrepareFilesForDailyReport(DateTime generateDate)
        {
            String dweek = generateDate.DayOfWeek.ToString();
              DateTime priorWeekDate = generateDate.AddDays(-8);
              DateTime priorWeekDateS = generateDate.AddDays(-10);
              DateTime FridayDate = generateDate.AddDays(-3);
              DateTime dTodayLinkDate = generateDate.AddDays(-1);

              DateTime rTodayLinkDate = dweek == "Monday" ? generateDate.AddDays(-4) : generateDate.AddDays(-2);

              string tldDate = dTodayLinkDate.ToString("yyyyMMdd");
              string tlrDate = rTodayLinkDate.ToString("yyyyMMdd");
              string pWeekDate = priorWeekDate.ToString("yyyyMMdd");
              string rDatey = rTodayLinkDate.Year.ToString();
              string rDatem = rTodayLinkDate.ToString("MM");
              string rDated = rTodayLinkDate.ToString("dd");
              string dDatey = dTodayLinkDate.Year.ToString();
              string dDatem = dTodayLinkDate.ToString("MM");
              string dDated = dTodayLinkDate.ToString("dd");

              ExcelHelper excelHelper = new ExcelHelper();

              //export today link
              string ssisPathTodaylink = packagePath + "todaylink.dtsx";
              string excelFullNameTodaylink = excelHelper.getFilenamePF(generateDate) + @"\" + dDatem + dDated + dDatey + "(Exclude Closed Before 6302009).xls";
              excelHelper.ExportDataBySSIS(ssisPathTodaylink, excelFullNameTodaylink);

              //export Tricare dump
              string ssisPathTricareDaily = packagePath + "tricaredaily.dtsx";
              string excelFullNameTricareDaily = excelHelper.getFilenamePF(generateDate) + @"\" + "Track Wise Dump-" + dDatem + dDated + dDatey + ".xls";
              excelHelper.ExportDataBySSIS(ssisPathTricareDaily, excelFullNameTricareDaily);

              //Annuity and Ebusiness report
              File.Copy(finalReportsPath + tldDate + @"\" + "Annuity and EBusiness-" + dDatem + dDated + ".xls", excelHelper.getFilenamePF(generateDate) + @"\" + "Annuity and EBusiness-" + dDatem + dDated + ".xls", true);

              ////business surpport backlog report
              File.Copy(finalReportsPath + tldDate + @"\" + "Service and TricareDaily-" + dDatem + dDated + ".xls", excelHelper.getFilenamePF(generateDate) + @"\" + "Service and TricareDaily-" + dDatem + dDated + ".xls", true);

              ////service remedy group level report
              File.Copy(finalReportsPath + tldDate + @"\" + "Service Remedy Group Level Report-" + dDatem + dDated + ".xls", excelHelper.getFilenamePF(generateDate) + @"\" + "Service Remedy Group Level Report-" + dDatem + dDated + ".xls", true);

              ////ebusiness dump
              File.Copy(finalReportsPath + tldDate + @"\" + "EBusiness ticket-" + dDatem + dDated + ".xls", excelHelper.getFilenamePF(generateDate) + @"\" + "EBusiness ticket-" + dDatem + dDated + dDatey + ".xls", true);

              ////annuity backlog dump
              File.Copy(finalReportsPath + tldDate + @"\" + "Annuity ticket-" + dDatem + dDated + ".xls", excelHelper.getFilenamePF(generateDate) + @"\" + "Annuity ticket-" + dDatem + dDated + dDatey + ".xls", true);

              System.Diagnostics.Process.Start("explorer.exe", excelHelper.getFilenamePF(generateDate));
        }
Example #8
0
        /// <summary>
        /// Prepare file for tricare Monday
        /// </summary>
        /// <param name="generateDate"></param>
        public void PrepareFilesForCorpTricareMonday(DateTime generateDate)
        {
            DateTime endDay = generateDate.AddDays(-3);
              DateTime startDay = generateDate.AddDays(-9);

              string endDateStr = endDay.ToString("yyyyMMdd");
              string startDateStr = startDay.ToString("yyyyMMdd");
              string priorGenerateDateStr = startDateStr;

              string ssisPathCorpTricare = packagePath + "tricateCorpWeeklyMonday.dtsx";
              string excelCorpTricarePath = corpTrackWeekly1Path + startDay.ToString("MMdd") + "-" + endDay.ToString("MMdd");
              string excelFullNameCorpTricare = excelCorpTricarePath + @"\" + "Corp Tricare Weekly New dump " + startDateStr + "-" + endDateStr + ".xls";

              if (!Directory.Exists(excelCorpTricarePath))
              {
              Directory.CreateDirectory(excelCorpTricarePath);
              }
              ExcelHelper excelHelper = new ExcelHelper();
              excelHelper.ExportDataBySSIS(ssisPathCorpTricare, excelFullNameCorpTricare);

              System.Diagnostics.Process.Start("explorer.exe", excelCorpTricarePath);
        }