コード例 #1
0
ファイル: clsCreateXML.cs プロジェクト: jworkman119/HTC
        private void addTableHeaders(ref XmlWriter xmlWrite)
        {
            clsDB            objDB     = new clsDB(staticVariables.dbPath);
            SQLiteDataReader objReader = objDB.returnHeaders();

            xmlWrite.WriteStartElement("Headers");
            while (objReader.Read())
            {
                xmlWrite.WriteStartElement("Column");
                xmlWrite.WriteElementString("Header", objReader["Name"].ToString());
                xmlWrite.WriteEndElement();
            }
            xmlWrite.WriteEndElement();
        }
コード例 #2
0
        public void CreateReport()
        {
            string strMonth = System.DateTime.Now.Month.ToString();
            int    Month    = returnMonth(strMonth);

            Month = 8;
            string        Year  = returnYear(Month.ToString());
            List <string> Files = new List <string>();
            clsDB         objDB = new clsDB(staticVariables.dbPath);


            clsCreateXML objXML = new clsCreateXML();

            objXML.Month = Month;
            objXML.Year  = Year;

            objXML.createXML("Month");
            CreateFO("Month");

            clsSaveReports objSave = new clsSaveReports();

            string strFile = objSave.saveFile("pinnacleMonthlyReviewCosts.pdf", "Month", CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(Month), Year);

            Files.Add(strFile);

            // Create Qtr report if the Month/3 has no remainder (% = mod function)
            if (Month % 3 == 0)
            {
                objXML.Qtr = Month / 3;
                objXML.createXML("Qtr");
                CreateFO("Qtr");
                string Qtr = objXML.returnOrdinal(Month / 3);
                strFile = objSave.saveFile("pinnacleQtrReviewCosts.pdf", "Qtr", Qtr + "Qtr", Year);
                Files.Add(strFile);
            }

            //           clsEmail objEmail = new clsEmail();
//            objEmail.mailReport(CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(Month) + " " + Year, Files);
        }