public ActionResult GetSeedList() { int RoleId = UserExtensions.ToRoleID(this.Identity); GetSeedListResponse response = seedListService.GetSeedList(new GetSeedListRquest() { RequestedBy = RoleId }); return(View("SeedList", response.SeedEmailViewModel)); }
public ActionResult GetList() { int RoleId = UserExtensions.ToRoleID(this.Identity); GetSeedListResponse response = seedListService.GetSeedList(new GetSeedListRquest() { RequestedBy = RoleId }); var data = response.SeedEmailViewModel; return(Json(new { success = true, response = data }, JsonRequestBehavior.AllowGet)); }
/// <summary> /// Gets all API keys list. /// </summary> /// <param name="request">The request.</param> /// <param name="name">The name.</param> /// <param name="filterdata">The filterdata.</param> /// <returns></returns> public ActionResult GetAllApiKeysList([DataSourceRequest] DataSourceRequest request, string name, string filterdata) { int RoleId = UserExtensions.ToRoleID(this.Identity); GetThirdPartyClientResponse response = thirdPartyClientService.GetAllThirdPartyClients(new GetThirdPartyClientRequest() { RequestedBy = RoleId, Name = name, Filter = filterdata }); return(Json(new DataSourceResult { Data = response.ThirdPartyClientViewModel }, JsonRequestBehavior.AllowGet)); }
public ActionResult MarketingMessagesListViewRead([DataSourceRequest] DataSourceRequest request) { AddCookie("messagepagesize", request.PageSize.ToString(), 1); AddCookie("messagepagenumber", request.Page.ToString(), 1); int RoleId = UserExtensions.ToRoleID(this.Identity); GetAllMarketingMessagesResponse response = marketingService.GetAllMarketingMessages(new GetAllMarketingMessagesRequest() { RequestedBy = RoleId, Limit = request.PageSize, PageNumber = request.Page }); foreach (var message in response.MarketingMessagesViewModel) { message.Title = message.MarketingMessageTitle.Length > 55 ? message.MarketingMessageTitle.Substring(0, 54) + "..." : message.Title = message.MarketingMessageTitle; message.CreatedDate = message.CreatedDate.ToUtc().ToUtcBrowserDatetime(); message.ScheduleFrom = message.ScheduleFrom.HasValue ? message.ScheduleFrom.Value.ToUtc().ToUtcBrowserDatetime() :(DateTime?)null; message.ScheduleTo = message.ScheduleTo.HasValue ? message.ScheduleTo.Value.ToUtc().ToUtcBrowserDatetime() : (DateTime?)null; } return(Json(new DataSourceResult { Data = response.MarketingMessagesViewModel, Total = response.TotalHits }, JsonRequestBehavior.AllowGet)); }