Example #1
0
 public void DeleteNoteByID(MNote objNote)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append("delete from tb_note where ID=@ID");
     OleDbParameter[] param = {
                                OleDbHelper.GetParameter("@ID",OleDbType.Integer,4,"ID",objNote.ID)
                            };
     OleDbHelper.ExecuteSql(sb.ToString(), param);
 }
Example #2
0
 public DataTable SelectNoteByUserName(MNote objNote)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append("select * from tb_note where notePerson =@NotePerson order by noteTime desc");
     OleDbParameter[] param = {
                                OleDbHelper.GetParameter("@NotePerson",OleDbType.VarWChar,20,"notePerson",objNote.NotePerson)
                            };
     DataTable dt = OleDbHelper.ExecuteDt(sb.ToString(), param);
     return dt;
 }
Example #3
0
 public DataTable SelectAllNotesByNotePerson(MNote objNote)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append("select * from tb_note where notePerson =@NotePerson order by noteTime desc");
     SqlParameter[] param = {
                                SQLDbHelper.GetParameter("@NotePerson",SqlDbType.VarChar,20,"notePerson",objNote.NotePerson)
                            };
     DataTable dt = SQLDbHelper.ExecuteDt(sb.ToString(), param);
     return dt;
 }
Example #4
0
 public bool InsertIntoNote(MNote objNote)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append("INSERT INTO tb_note (title, noteContent, noteTime, notePerson) VALUES(@Title,@NoteContent,@NoteTime,@NotePerson)");
     OleDbParameter[] param = {
                                OleDbHelper.GetParameter("@Title",OleDbType.VarWChar,50,"title",objNote.Title),
                                OleDbHelper.GetParameter("@NoteContent",OleDbType.LongVarWChar,"noteContent",objNote.NoteContent),
                                OleDbHelper.GetParameter("@NoteTime",OleDbType.Date,"noteTime",objNote.NoteTime),
                                OleDbHelper.GetParameter("@NotePerson",OleDbType.VarWChar,20,"notePerson",objNote.NotePerson)
                            };
     bool is_succeed = OleDbHelper.ExecuteSql(sb.ToString(), param);
     if (is_succeed)
         return true;
     else
         return false;
 }
Example #5
0
 public DataTable SelectNoteByUserName(MNote objNote)
 {
     return notes.SelectNoteByUserName(objNote);
 }
Example #6
0
 public DataTable SelectAllNotesByNotePerson(MNote objNote)
 {
     return notes.SelectAllNotesByNotePerson(objNote);
 }
Example #7
0
 public bool InsertIntoNote(MNote objNote)
 {
     return notes.InsertIntoNote(objNote);
 }
Example #8
0
 public void DeleteNoteByID(MNote objNote)
 {
     notes.DeleteNoteByID(objNote);
 }