Esempio n. 1
0
        public static PoliticiansAdminReportViewTable GetData(
            PoliticiansAdminReportViewOptions options, int commandTimeout = -1)
        {
            var cmdText = SelectAllCommandText + options.BuildWhereClause();
            var cmd     = VoteDb.GetCommand(cmdText, commandTimeout);

            return(FillTable(cmd, PoliticiansAdminReportViewTable.ColumnSet.All));
        }
Esempio n. 2
0
        // ReSharper disable MemberCanBePrivate.Global
        // ReSharper disable MemberCanBeProtected.Global
        // ReSharper disable UnusedMember.Global
        // ReSharper disable UnusedMethodReturnValue.Global
        // ReSharper disable UnusedAutoPropertyAccessor.Global

        public static int CountData(PoliticiansAdminReportViewOptions options,
                                    int commandTimeout = -1)
        {
            var cmdText = "SELECT COUNT(*) FROM PoliticiansAdminReportView" +
                          options.BuildWhereClause();
            var cmd    = VoteDb.GetCommand(cmdText, commandTimeout);
            var result = VoteDb.ExecuteScalar(cmd);

            return(Convert.ToInt32(result));
        }