// GET: Admin/Post public ActionResult Index() { OpPostBase op = new OpPostBase(); var result = _manager.ExecuteOperation(op); return(View(result.Items as PostDto[])); }
public JsonResult Index() { OpPostBase opPost = new OpPostBase(); OperationResult result = _manager.ExecuteOperation(opPost); return(Json(result, JsonRequestBehavior.AllowGet)); }
private PostDTO getInstance(int id) { OpPostBase op = new OpPostBase(); op.Criteria.Id = id; var result = _manager.ExecuteOperation(op); PostDTO dto = result.Items[0] as PostDTO; return(dto); }
public ActionResult Index() { OpPostBase opPost = new OpPostBase(); var resultPost = _manager.ExecuteOperation(opPost); PocetnaViewModel vm = new PocetnaViewModel { Post = (resultPost.Items as PostDto[]).ToList() }; return(View(vm)); }
// GET: Admin/Post public ActionResult Index() { OpPostBase op = new OpPostBase(); if (!User.IsInRole("admin")) { op.Criteria.Uuid = User.Identity.GetUserId(); } var posts = _manager.ExecuteOperation(op); return(View(posts.Items as PostDTO[])); }
public ActionResult Index() { OpPostBase op = new OpPostBase(); var postovi = _manager.ExecuteOperation(op); OpCategoriesBase op3 = new OpCategoriesBase(); var categories = _manager.ExecuteOperation(op3); OpHeaderBase op2 = new OpHeaderBase(); var header = _manager.ExecuteOperation(op2); HomeViewModel home = new HomeViewModel { Posts = (postovi.Items as PostDTO[]).ToList(), Categories = (categories.Items as CategoryDTO[]).ToList(), Broj = postovi.Broj, Header = header.Items[0] as HeaderDTO, HotPost = postovi.Items[0] as PostDTO }; return(View(home)); }