public JsonNetResult GetNewestDistributors() { var customerID = Identity.Current.CustomerID; try { var newestDistributors = Cache.Get("Dashboard_NewestDistributors_{0}".FormatWith(customerID), TimeSpan.FromMinutes(WidgetCacheTimeout), () => ExigoDAL.GetNewestDistributors(new GetNewestDistributorsRequest { CustomerID = customerID, RowCount = GlobalSettings.Backoffices.Reports.Dashboard.NewestDistributors.MaxResultSize, CustomerStatuses = GlobalSettings.Backoffices.Reports.Dashboard.NewestDistributors.CustomerStatuses, CustomerTypes = GlobalSettings.Backoffices.Reports.Dashboard.NewTeamMemebers.CustomerTypes, Days = GlobalSettings.Backoffices.Reports.Dashboard.NewestDistributors.Days, }) ); var html = this.RenderPartialViewToString("Cards/NewestDistributors", newestDistributors); return(new JsonNetResult(new { success = true, html })); } catch (Exception ex) { return(new JsonNetResult(new { success = false, message = ex.Message })); } }