public ActionResult SelectAccount() { var rr = new ReportRequestor(CurrentItem.Token); var accounts = rr.GetAccounts(); return(PartialView("SelectAccount", accounts)); }
private IEnumerable <GenericEntry> GetStatisticsEntries(DateTime from, DateTime to) { var rr = new ReportRequestor(CurrentItem.Token); var entries = rr.RequestReport( new AnalyticsAccountInfo { AccountID = CurrentItem.AccountID, ProfileID = CurrentItem.ProfileID, Title = CurrentItem.Title, AccountName = CurrentItem.AccountName }, CurrentItem.Dimensions, CurrentItem.Metrics, from, to); return(entries); }
public ActionResult SaveSelectedAccount(int profileID) { var rr = new ReportRequestor(CurrentItem.Token); var accounts = rr.GetAccounts(); var account = accounts.Where(a => a.ProfileID == profileID).FirstOrDefault(); if (account != null) { CurrentItem.ProfileID = profileID; CurrentItem.AccountID = account.AccountID; CurrentItem.AccountName = account.AccountName; CurrentItem.Title = account.Title; Engine.Persister.Save(CurrentItem); } return(Redirect(CurrentPage.Url)); }