Beispiel #1
0
        public saCommonReportData GetCustomerStats()
        {
            //normally we would get data from database and figure out how many cols and rows
            //then we would populate the saCommonReportData object and return it

            int numCols = 6, numRows = 2;
            saCommonReportData rd;
            saRowValues        rv;

            //instantiate the common report data object
            rd = new saCommonReportData(numRows, numCols);
            //set up the header info
            rd.columns.colMap   = new string[] { "custID", "custName", "dataVolume", "lastLoadDate", "logins", "reports" };
            rd.columns.names    = new string[] { "custID", "Client", "Volume", "Last Load", "Logins", "Reports" };
            rd.columns.hdrAttr  = new string[] { "hide", "text-left info", "text-right info", "text-left info", "text-right info", "text-right info" };
            rd.columns.cellAttr = new string[] { "hide", "text-left", "text-right", "text-left", "text-right", "text-right" };
            //add the rows
            //new row
            rv        = new saRowValues(numCols);
            rv.values = new string[] { "1", "Waxie", "1194876", "1/1/2016", "1269", "222" };
            rd.rows.Add(rv);
            //new row
            rv        = new saRowValues(numCols);
            rv.values = new string[] { "2", "HP Products", "1104527", "2/1/2016", "789", "223" };
            rd.rows.Add(rv);

            return(rd);
        }
Beispiel #2
0
        public saCommonReportData GetCustomerReportStats(int custID)
        {
            //normally we would get data from database and figure out how many cols and rows
            //then we would populate the saCommonReportData object and return it
            int numCols = 3, numRows = 5;
            saCommonReportData rd;
            saRowValues        rv;

            //instantiate the common report data object
            rd = new saCommonReportData(numRows, numCols);
            //set up the header info
            rd.columns.colMap   = new string[] { "reportID", "reportName", "numRuns" };
            rd.columns.names    = new string[] { "reportID", "Report", "# Runs" };
            rd.columns.hdrAttr  = new string[] { "hide", "text-left info", "text-right info" };
            rd.columns.cellAttr = new string[] { "hide", "text-left", "text-right" };
            //add the rows
            //new row
            rv        = new saRowValues(numCols);
            rv.values = new string[] { "1", "Ranking", "1194876", "123" };
            rd.rows.Add(rv);
            //new row
            rv        = new saRowValues(numCols);
            rv.values = new string[] { "2", "P&L", "1104527", "89" };
            rd.rows.Add(rv);
            //new row
            rv        = new saRowValues(numCols);
            rv.values = new string[] { "3", "Trend Graph", "71" };
            rd.rows.Add(rv);
            //new row
            rv        = new saRowValues(numCols);
            rv.values = new string[] { "4", "Matrix", "55" };
            rd.rows.Add(rv);
            //new row
            rv        = new saRowValues(numCols);
            rv.values = new string[] { "5", "Customer Potential", "33" };
            rd.rows.Add(rv);

            return(rd);
        }