コード例 #1
0
ファイル: AddCommentLike.cs プロジェクト: Shiloff/Terem
 public ActionResult AddCommentLike(long? ApartmentCommentId)
 {
     InfoApartmentCommentResult result = new InfoApartmentCommentResult();
     ApartmentRepository.AddApartmentCommentLike((long)ApartmentCommentId,(long)user.ProfileId);
     result.Comment=ApartmentRepository.GetApartmentComment((long)ApartmentCommentId);
     result.Apartment=ApartmentRepository.GetApartment((long)result.Comment.ApartmentId);
     result.Me = ProfileRepository.GetProfile(user.ProfileId);
     return PartialView("_InfoComment", result);
 }
コード例 #2
0
ファイル: AddComment.cs プロジェクト: Shiloff/Terem
 public ActionResult AddComment(ApartmentComment apartmentComment)
 {
     InfoApartmentCommentResult result = new InfoApartmentCommentResult();
     if(ApartmentRepository.IsApartmentExists((long)apartmentComment.ApartmentId))
     {
         apartmentComment.Date = DateTime.Now;
         ApartmentRepository.AddApartmentComment(apartmentComment);
     }
     result.Me = ProfileRepository.GetProfile(user.ProfileId);
     result.Apartment = ApartmentRepository.GetApartment((long)apartmentComment.ApartmentId);
     result.Comment = ApartmentRepository.GetApartmentComment(apartmentComment.ApartmentCommentId);
     return PartialView("_InfoComment", result);
 }