示例#1
0
文件: MessageDb.cs 项目: howleg/up
    public bool MarkMessageRead(int msgId)
    {
        storedProcedure myProc = new storedProcedure("MarkAsRead");
            myProc.addParam(new paramter("@id", msgId.ToString()));

            return myProc.executeNonQueryParam();
    }
示例#2
0
    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();
    }
示例#3
0
    public bool MarkMessageRead(int msgId)
    {
        storedProcedure myProc = new storedProcedure("MarkAsRead");

        myProc.addParam(new paramter("@id", msgId.ToString()));

        return(myProc.executeNonQueryParam());
    }
示例#4
0
    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();
    }
示例#5
0
文件: MessageDb.cs 项目: howleg/up
    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();
    }
示例#6
0
    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());
    }
示例#7
0
    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();
    }
示例#8
0
文件: student22.cs 项目: howleg/up
    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();
    }