コード例 #1
0
        private List <BasicEntry> GetForms(bool basic)
        {
            List <BasicEntry> result = new List <BasicEntry>();

            try
            {
                string sql = "SELECT ID, Name";
                if (!basic)
                {
                    sql += ", BodyHTML";
                }
                sql += " FROM [ReportingForm]";
                SqliteDataReader reader = this.ExecuteReader(sql);
                while (reader.Read())
                {
                    BasicEntry entry = new BasicEntry(int.Parse(reader[0].ToString()), reader[1].ToString(), "");
                    result.Add(entry);
                    if (!basic)
                    {
                        entry.Tag = reader[2].ToString();
                    }
                }
                return(result);
            }
            finally
            {
                this.CleanUp();
            }
        }
コード例 #2
0
        private List <BasicEntry> GetTemplates(bool basic)
        {
            List <BasicEntry> result = new List <BasicEntry>();

            try
            {
                string sql = "SELECT ID, name";
                if (!basic)
                {
                    sql += ", bodyHTML";
                }
                sql    += " FROM [ReportingTemplate]";
                _reader = this.ExecuteReader(sql);

                while (_reader.Read())
                {
                    BasicEntry entry = new BasicEntry(int.Parse(_reader[0].ToString()), _reader[1].ToString(), "");
                    result.Add(entry);
                    if (!basic)
                    {
                        entry.Tag = _reader[2].ToString();
                    }
                }
                return(result);
            }
            finally
            {
                this.CleanUp();
            }
        }