コード例 #1
0
ファイル: WebNoteBiz.cs プロジェクト: hisham-elbreky/WebShell
        public static bool AdNote(long userId, string title, bool isPublic, string tag, string content)
        {
            try
            {
                WNDataContext db = new WNDataContext();
                Note note = new Note();
                note.user_Id = userId;
                note.title = title;
                note.isPublic = isPublic;
                note.content = content;
                note.creation_date = DateTime.Now;
                note.last_update = DateTime.Now;

                db.Notes.InsertOnSubmit(note);
                db.SubmitChanges();
                return true;
            }
            catch (Exception e)
            {
                //TODO: log error -> medium
                return false;
            }
        }
コード例 #2
0
 partial void DeleteNote(Note instance);
コード例 #3
0
 partial void UpdateNote(Note instance);
コード例 #4
0
 partial void InsertNote(Note instance);
コード例 #5
0
		private void detach_Notes(Note entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
コード例 #6
0
		private void attach_Notes(Note entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}