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

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

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

            return View("_post", posts);
        }
Example #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();
 }
Example #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");
        }
Example #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);
        }
Example #9
0
 //alterar o status para desativo
 public ActionResult Delete(Post post)
 {
     PostServiceClient service = new PostServiceClient();
     //service.delete(post);
     return View();
 }
Example #10
0
 public ActionResult Save(Post post)
 {
     PostServiceClient service = new PostServiceClient();
     service.save(post);
     return RedirectToAction("FindPost");
 }
 public NewsController(IAuthProvider authProvider)
 {
     _postService = new PostServiceClient();
     _authProvider = authProvider;
 }
 public PostsController()
 {
     _postService = new PostServiceClient();
 }
 public NewsController(IAuthProvider authProvider)
 {
     _postService  = new PostServiceClient();
     _authProvider = authProvider;
 }
 public PostsController()
 {
     _postService = new PostServiceClient();
 }