Esempio n. 1
0
 public Boolean deleteComments(Comment oldComment)
 {
     try
     {
         this.DataContext.Comments.DeleteOnSubmit(oldComment);
         this.DataContext.SubmitChanges();
         return true;
     }
     catch (Exception) /*FIXME*/
     {
         return false;
     }
 }
Esempio n. 2
0
 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;
     }
 }
Esempio n. 3
0
 public Boolean insertComments(Comment newComment)
 {
     try
     {
         this.DataContext.Comments.InsertOnSubmit(newComment);
         this.DataContext.SubmitChanges();
         return true;
     }
     catch (Exception) /*FIXME*/
     {
         return false;
     }
 }
Esempio n. 4
0
		private void detach_Comments(Comment entity)
		{
			this.SendPropertyChanging();
			entity.User1 = null;
		}
Esempio n. 5
0
		private void attach_Comments(Comment entity)
		{
			this.SendPropertyChanging();
			entity.User1 = this;
		}
Esempio n. 6
0
 partial void DeleteComment(Comment instance);
Esempio n. 7
0
 partial void UpdateComment(Comment instance);
Esempio n. 8
0
 partial void InsertComment(Comment instance);