예제 #1
0
파일: DALib.cs 프로젝트: r0llup/SocialNet
 public Boolean deleteComments(Comment oldComment)
 {
     try
     {
         this.DataContext.Comments.DeleteOnSubmit(oldComment);
         this.DataContext.SubmitChanges();
         return true;
     }
     catch (Exception) /*FIXME*/
     {
         return false;
     }
 }
예제 #2
0
파일: DALib.cs 프로젝트: r0llup/SocialNet
 public Boolean editComments(String oldEvent, String oldUser, Comment newComment)
 {
     try
     {
         Comment editableComment = this.DataContext.Comments.Single(c => (c.Event == oldEvent) && (c.User == oldUser));
         editableComment.Event = newComment.Event;
         editableComment.User = newComment.User;
         editableComment.Photo = newComment.Photo;
         editableComment.Commentaire = newComment.Commentaire;
         this.DataContext.SubmitChanges();
         return true;
     }
     catch (Exception) /*FIXME*/
     {
         return false;
     }
 }
예제 #3
0
파일: DALib.cs 프로젝트: r0llup/SocialNet
 public Boolean insertComments(Comment newComment)
 {
     try
     {
         this.DataContext.Comments.InsertOnSubmit(newComment);
         this.DataContext.SubmitChanges();
         return true;
     }
     catch (Exception) /*FIXME*/
     {
         return false;
     }
 }
예제 #4
0
		private void detach_Comments(Comment entity)
		{
			this.SendPropertyChanging();
			entity.User1 = null;
		}
예제 #5
0
		private void attach_Comments(Comment entity)
		{
			this.SendPropertyChanging();
			entity.User1 = this;
		}
예제 #6
0
 partial void DeleteComment(Comment instance);
예제 #7
0
 partial void UpdateComment(Comment instance);
예제 #8
0
 partial void InsertComment(Comment instance);