public bool MarkMessageRead(int msgId) { storedProcedure myProc = new storedProcedure("MarkAsRead"); myProc.addParam(new paramter("@id", msgId.ToString())); return myProc.executeNonQueryParam(); }
public void removeFriend(string user_id, string friend_id) { storedProcedure myProc = new storedProcedure("removeFriend"); myProc.addParam(new paramter("@user_id", user_id)); myProc.addParam(new paramter("@friend_id", friend_id)); myProc.executeNonQueryParam(); }
public bool MarkMessageRead(int msgId) { storedProcedure myProc = new storedProcedure("MarkAsRead"); myProc.addParam(new paramter("@id", msgId.ToString())); return(myProc.executeNonQueryParam()); }
public bool SendMessage(string senderID, string recieverID, string subject, string body) { storedProcedure myProc = new storedProcedure("SendMessage"); myProc.addParam(new paramter("@senderID", senderID)); myProc.addParam(new paramter("@recieverID", recieverID)); myProc.addParam(new paramter("@subject", subject)); myProc.addParam(new paramter("@body", body)); return myProc.executeNonQueryParam(); }
public bool SendMessage(string senderID, string recieverID, string subject, string body) { storedProcedure myProc = new storedProcedure("SendMessage"); myProc.addParam(new paramter("@senderID", senderID)); myProc.addParam(new paramter("@recieverID", recieverID)); myProc.addParam(new paramter("@subject", subject)); myProc.addParam(new paramter("@body", body)); return(myProc.executeNonQueryParam()); }
public void setStudentAttributes(String newName, String newSelectedMajor, String newAboutMe) { if (String.IsNullOrEmpty(newName)) { newName = this.actualName; } else { this.actualName = newName; } if (String.IsNullOrEmpty(newSelectedMajor)) { newSelectedMajor = this.major; } else { this.major = newSelectedMajor; } this.aboutMe = newAboutMe; paramter param1 = new paramter("@student_id", this.student_id); paramter param2 = new paramter("@actualName", newName); paramter param3 = new paramter("@major_name", newSelectedMajor); paramter param4 = new paramter("@text", newAboutMe); storedProcedure myProc = new storedProcedure("updateStudentInfo"); myProc.addParam(param1); myProc.addParam(param2); myProc.addParam(param3); myProc.addParam(param4); myProc.executeNonQueryParam(); }
public void setStudentAttributes(String newName,String newSelectedMajor,String newAboutMe) { if (String.IsNullOrEmpty(newName)) newName = this.actualName; else this.actualName = newName; if (String.IsNullOrEmpty(newSelectedMajor)) newSelectedMajor = this.major; else this.major = newSelectedMajor; this.aboutMe = newAboutMe; paramter param1 = new paramter("@student_id", this.student_id); paramter param2 = new paramter("@actualName", newName); paramter param3 = new paramter("@major_name", newSelectedMajor); paramter param4 = new paramter("@text", newAboutMe); storedProcedure myProc = new storedProcedure("updateStudentInfo"); myProc.addParam(param1); myProc.addParam(param2); myProc.addParam(param3); myProc.addParam(param4); myProc.executeNonQueryParam(); }