Exemplo n.º 1
0
 //
 public ActionResult FindByLegend(Post post)
 {
     PostServiceClient service = new PostServiceClient();
     //Davi ira fazer o metodo
     //service.findByLegend(post);
     return PartialView("_FindPost");
 }
Exemplo n.º 2
0
        public ActionResult FindById(Post post)
        {
            PostServiceClient service = new PostServiceClient();

            service.find(post);
            return View();
        }
Exemplo n.º 3
0
 public ActionResult FindByLatLong(Post post)
 {
     PostServiceClient service = new PostServiceClient();
     //Davi ira fazer o metodo
     service.findAllByLatitudeAndLongitude(post);
     return View();
 }
Exemplo n.º 4
0
        public ActionResult Index()
        {
            PostServiceClient service = new PostServiceClient();

            List<Post> posts = service.findAll().ToList();

            return View("_post", posts);
        }
Exemplo n.º 5
0
 public UserController(IAuthProvider authProvider)
 {
     _postService    = new PostServiceClient();
     _friendService  = new FriendServiceClient();
     _userService    = new UserServiceClient();
     _authProvider   = authProvider;
     _commentService = new CommentServiceClient();
 }
 public UserController(IAuthProvider authProvider)
 {
     _postService = new PostServiceClient();
     _friendService = new FriendServiceClient();
     _userService = new UserServiceClient();
     _authProvider = authProvider;
     _commentService = new CommentServiceClient();
 }
Exemplo n.º 7
0
        public ActionResult AddPost(Core.Models.Post model)
        {
            PostServiceClient service = new PostServiceClient();

            Post p = new Post();

            p.createdAt = new DateTime();
            p.item = new Item() {category = new Category() { categoryId = 1, name = "categoria", status = 1 } };

            p.user = new User() { userId = ((Core.UserServiceService.User)Session["currentUser"]).userId };
            p.place = new Place() { city = "Sampa", name = "teste", placeId = 1 };

            p.legend = model.legend;
            p.item.description = model.item.description;
            p.item.category.categoryId = model.item.category.categoryId;

            service.save(p);
            return RedirectToAction("Index");
        }
Exemplo n.º 8
0
        public ActionResult post()
        {
            PostServiceClient service = new PostServiceClient();

            List<Post> posts = service.findAll().ToList();
                //from post in service.findAll()
                                          //select new Core.Models.Post
                                          //{
                                          //    createdAt = post.createdAt,
                                          //    item = new Models.Item(){
                                          //        category =

                                          //    }
                                          //    post.item,

                                          //};

            return View("_post", posts);
        }
Exemplo n.º 9
0
 //alterar o status para desativo
 public ActionResult Delete(Post post)
 {
     PostServiceClient service = new PostServiceClient();
     //service.delete(post);
     return View();
 }
Exemplo n.º 10
0
 public ActionResult Save(Post post)
 {
     PostServiceClient service = new PostServiceClient();
     service.save(post);
     return RedirectToAction("FindPost");
 }
Exemplo n.º 11
0
 public NewsController(IAuthProvider authProvider)
 {
     _postService = new PostServiceClient();
     _authProvider = authProvider;
 }
 public PostsController()
 {
     _postService = new PostServiceClient();
 }
Exemplo n.º 13
0
 public NewsController(IAuthProvider authProvider)
 {
     _postService  = new PostServiceClient();
     _authProvider = authProvider;
 }
 public PostsController()
 {
     _postService = new PostServiceClient();
 }