/// <summary> /// /// </summary> /// <returns></returns> public ActionResult Dashboard() { UserDomainLogic userdomainLogic = new UserDomainLogic(); Dashboard dashboard = new Dashboard(); OrderDomainLogic orderDomainLogic = new OrderDomainLogic(); WalletDomainLogic walletDomainLogic = new WalletDomainLogic(); dashboard.MyMessage = userdomainLogic.GetMyMessages(UserVariables.LoggedInUserGuid); if (UserVariables.UserRole == Bringly.Domain.Enums.User.UserRoles.Buyer) { dashboard.MyFavourites = userdomainLogic.FavouriteLocations(2); } else { dashboard.MyFavourites = null; } if (UserVariables.UserRole == Bringly.Domain.Enums.User.UserRoles.Merchant) { MyReview myreview = new MyReview(); myreview.UserGuid = UserVariables.LoggedInUserGuid; dashboard.MyReview = userdomainLogic.GetMyReviewMerchant(myreview); dashboard.MyReview.GivenBusinessReviews = dashboard.MyReview.GivenBusinessReviews.Count > 0 ? dashboard.MyReview.GivenBusinessReviews.Take(2).ToList() : dashboard.MyReview.GivenBusinessReviews; } dashboard.Wallet = walletDomainLogic.GetWallet(UserVariables.LoggedInUserGuid); dashboard.MyOrder = orderDomainLogic.GetMyOrderCounts(UserVariables.LoggedInUserGuid, UserVariables.UserRole); return(View(dashboard)); }