// Binds data to tables in Editor Report screen protected void ShowData() { double approvedCount = GlobalState.rules.PrintUsersApprovedRules(User.Identity.GetUserId()).Count(); double rejectedCount = GlobalState.rules.PrintUsersRejectedRules(User.Identity.GetUserId()).Count(); Dictionary <string, string> approvedRulesList = GlobalState.rules.PrintUsersApprovedRules(User.Identity.GetUserId()); Dictionary <string, string> ruleStatistics = new Dictionary <string, string> { { "Count of Approved", approvedCount.ToString("N0") }, { "Cound of Rejected", rejectedCount.ToString("N0") }, { "Success Rate", (approvedCount / (approvedCount + rejectedCount) * 100).ToString("N0") + "%" } }; MyRulesGridView.DataSource = approvedRulesList; MyRulesGridView.DataBind(); RulesStatisticsGridView.DataSource = ruleStatistics; RulesStatisticsGridView.DataBind(); }
// Binds data to tables in Rules Report screen protected void ShowData() { double approvedCount = GlobalState.rules.CountApproved(); double rejectedCount = GlobalState.rules.CountRejected(); DataTable approvedRulesList = GlobalState.rules.PrintApprovedRules(); Dictionary <string, string> ruleStatistics = new Dictionary <string, string> { { "Count of Approved", approvedCount.ToString("N0") }, { "Count of Rejected", rejectedCount.ToString("N0") }, { "Success Rate", (approvedCount / (approvedCount + rejectedCount) * 100).ToString("N0") + "%" } }; ApprovedRulesGridView.DataSource = approvedRulesList; ApprovedRulesGridView.DataBind(); RulesStatisticsGridView.DataSource = ruleStatistics; RulesStatisticsGridView.DataBind(); }