public async Task <IActionResult> Delete(int Id, ShowlocationTypeSSOT Showlocation, MainPageContentTypeSSOT?MainPageContentType) { var result = await _ContentManagementRepository.Delete(Id); TempData.AddResult(result); return(RedirectToAction(nameof(Index), new { Showlocation, MainPageContentType })); }
public IActionResult Create(ShowlocationTypeSSOT Showlocation, MainPageContentTypeSSOT?MainPageContentType) { ViewBag.Showlocation = Showlocation; if (Showlocation == ShowlocationTypeSSOT.FirstPage) { ViewBag.MainPageContentType = MainPageContentType; } return(View()); }
//[DisplayName("مدیریت محتوا ")] //[GroupingDashboard(GroupingDashboardSSOT.Banks)] public async Task <IActionResult> Index(ContentEntitySearchViewModel search, MainPageContentTypeSSOT?MainPageContentType, ShowlocationTypeSSOT Showlocation) { var conditions = new ConditionHelper <ContentEntityDTO>(); search.MainPageContentType = MainPageContentType; search.Showlocation = Showlocation; conditions.AddCondition(p => p.Showlocation.Equals(search.Showlocation)); if (MainPageContentType != null) { conditions.AddCondition(p => p.MainPageContentType.Equals(MainPageContentType)); } if (search.Title != null) { conditions.AddCondition(p => p.Title.Contains(search.Title)); } var data = await _ContentManagementRepository.GetAll(conditions.GetConditionList()); var TotalCount = data.Count(); var model = new SearchCriteriaPageModel <List <ContentEntityDTO>, ContentEntitySearchViewModel, int>(data, search, TotalCount); return(View(model)); }