コード例 #1
0
        public void ViewLabOrderLog(DateTime orderDate)
        {
            string rptpath = @"\\CFileServer\documents\Reports\Lab\LabOrdersLog\YEAR\MONTH\LabOrdersLog.FILEDATE.v1.xml";

            string rptName = rptpath.Replace("YEAR", orderDate.ToString("yyyy"));

            rptName = rptName.Replace("MONTH", orderDate.ToString("MMMM"));
            rptName = rptName.Replace("FILEDATE", orderDate.ToString("MM.dd.yy"));

            YellowstonePathology.Business.Reports.LabOrdersLog labOrdersLog = new YellowstonePathology.Business.Reports.LabOrdersLog();
            labOrdersLog.CreateReport(orderDate);

            string holdRptName = string.Empty;

            do
            {
                holdRptName = rptName;
                int vLocation       = rptName.IndexOf(".v");
                int originalVersion = Convert.ToInt32(rptName.Substring(vLocation + 2, 1));
                int newVersion      = originalVersion + 1;
                rptName = rptName.Replace(".v" + originalVersion.ToString(), ".v" + newVersion.ToString());
            } while (File.Exists(rptName));

            YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(holdRptName);
        }
コード例 #2
0
ファイル: LabUI.cs プロジェクト: ericramses/YPILIS
        public void ViewLabOrderLog(DateTime orderDate)
        {
            string rptpath = @"\\CFileServer\documents\Reports\Lab\LabOrdersLog\YEAR\MONTH\LabOrdersLog.FILEDATE.v1.xml";

            string rptName = rptpath.Replace("YEAR", orderDate.ToString("yyyy"));
            rptName = rptName.Replace("MONTH", orderDate.ToString("MMMM"));
            rptName = rptName.Replace("FILEDATE", orderDate.ToString("MM.dd.yy"));

            YellowstonePathology.Business.Reports.LabOrdersLog labOrdersLog = new YellowstonePathology.Business.Reports.LabOrdersLog();
            labOrdersLog.CreateReport(orderDate);

            string holdRptName = string.Empty;
            do
            {
                holdRptName = rptName;
                int vLocation = rptName.IndexOf(".v");
                int originalVersion = Convert.ToInt32(rptName.Substring(vLocation + 2, 1));
                int newVersion = originalVersion + 1;
                rptName = rptName.Replace(".v" + originalVersion.ToString(), ".v" + newVersion.ToString());
            } while (File.Exists(rptName));

            YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(holdRptName);
        }