public void GetAgencyEventStats() { List <EventStat> list = new List <EventStat>(); int recordCount; list.AddRange(EventStat.GetAgencyEventStats(5, out recordCount)); Assert.IsTrue(recordCount > 20); Assert.AreEqual(list.Count, 10); }
public ActionResult Dashboard(int page = 1, int pageSize = 10) { int totalRecords; PagedItemsModel model = new PagedItemsModel(); //TODO: Create composite to handle both agencies and applicants model.Items = EventStat.GetAgencyEventStats(Convert.ToInt32(Session["AgencyID"]), out totalRecords, page, pageSize); model.TotalRows = totalRecords; model.PageSize = pageSize; if (Request.IsAjaxRequest()) { ; } //TODO: Create partial return(View(model)); }
public ActionResult Dashboard(int id, int page = 1, int pageSize = 10) { if (User.IsInRole("AgencyAdmin") && id != Convert.ToInt32(Session["AgencyID"])) { throw new HttpException(401, Resources.UnauthorizedAccessMessage); } int totalRecords; PagedItemsModel model = new PagedItemsModel(); //TODO: Create composite to handle both agencies and applicants model.Items = EventStat.GetAgencyEventStats(id, out totalRecords, page, pageSize); model.TotalRows = totalRecords; model.PageSize = pageSize; if (Request.IsAjaxRequest()) { ; } //TODO: Create partial return(View(model)); }