Beispiel #1
0
 public DataTable getFriendsList(string user_id)
 {
     storedProcedure myProc = new storedProcedure("getFriendsList");
     myProc.addParam(new paramter("@user_id", user_id));
     DataTable table = new DataTable();
     return table = myProc.executeReader();
 }
Beispiel #2
0
    public DataTable getAllUsernames()
    {
        storedProcedure myProc = new storedProcedure("getAllUsernames");
        DataTable       table  = new DataTable();

        return(table = myProc.executeReader());
    }
Beispiel #3
0
 public DataTable GetSentMessages(string userID)
 {
     DataTable table = new DataTable();
         storedProcedure myProc = new storedProcedure("GetSentMessages");
         myProc.addParam(new paramter("@userId", userID));
         return table = myProc.executeReader();
 }
Beispiel #4
0
    public DataTable GetUserList()
    {
        DataTable       table  = new DataTable();
        storedProcedure myProc = new storedProcedure("GetUserList");

        return(table = myProc.executeReader());
    }
Beispiel #5
0
 public DataTable getAmountOfUnreadMsg(string UserId)
 {
     DataTable table = new DataTable();
     storedProcedure myProc = new storedProcedure("getAmountOfUnreadMsg");
     myProc.addParam(new paramter("@UserId", UserId));
     return table = myProc.executeReader();
 }
Beispiel #6
0
    public DataTable GetUserDetails(string userId)
    {
        DataTable table = new DataTable();
            storedProcedure myProc = new storedProcedure("GetUserDetails");
            myProc.addParam(new paramter("@userId", userId));

            return table = myProc.executeReader();
    }
Beispiel #7
0
    public DataTable GetSentMessages(string userID)
    {
        DataTable       table  = new DataTable();
        storedProcedure myProc = new storedProcedure("GetSentMessages");

        myProc.addParam(new paramter("@userId", userID));
        return(table = myProc.executeReader());
    }
Beispiel #8
0
    public DataTable getAmountOfUnreadMsg(string UserId)
    {
        DataTable       table  = new DataTable();
        storedProcedure myProc = new storedProcedure("getAmountOfUnreadMsg");

        myProc.addParam(new paramter("@UserId", UserId));
        return(table = myProc.executeReader());
    }
Beispiel #9
0
    public DataTable GetMessageDetails(int messageId)
    {
        DataTable table = new DataTable();
            storedProcedure myProc = new storedProcedure("ReadMessage");
            myProc.addParam(new paramter("@id", messageId.ToString()));

            return table = myProc.executeReader();
    }
Beispiel #10
0
    public DataTable getConversation(string recieverID, string senderID)
    {
        storedProcedure myProc = new storedProcedure("getConversation");
        myProc.addParam(new paramter("@recieverID", recieverID));
        myProc.addParam(new paramter("@senderID", senderID));
        DataTable table = new DataTable();

        return table = myProc.executeReader();
    }
Beispiel #11
0
    public DataTable GetMessageDetails(int messageId)
    {
        DataTable       table  = new DataTable();
        storedProcedure myProc = new storedProcedure("ReadMessage");

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

        return(table = myProc.executeReader());
    }
Beispiel #12
0
    public DataTable mutualFriends(string user_id, string visitedUser_Id)
    {
        storedProcedure myProc = new storedProcedure("mutualFriends");
        myProc.addParam(new paramter("@user_id", user_id));
        myProc.addParam(new paramter("@visitedUser_Id", visitedUser_Id));
        DataTable table = new DataTable();

        return table = myProc.executeReader();
    }
Beispiel #13
0
    public DataTable getFriendsList(string user_id)
    {
        storedProcedure myProc = new storedProcedure("getFriendsList");

        myProc.addParam(new paramter("@user_id", user_id));
        DataTable table = new DataTable();

        return(table = myProc.executeReader());
    }
Beispiel #14
0
    public DataTable checkIfFriend(string user_id, string friend_id)
    {
        storedProcedure myProc = new storedProcedure("checkIfFriend");
        myProc.addParam(new paramter("@user_id", user_id));
        myProc.addParam(new paramter("@friend_id", friend_id));
        DataTable table = new DataTable();

        return table = myProc.executeReader();
    }
Beispiel #15
0
    public DataTable getConversation(string recieverID, string senderID)
    {
        storedProcedure myProc = new storedProcedure("getConversation");

        myProc.addParam(new paramter("@recieverID", recieverID));
        myProc.addParam(new paramter("@senderID", senderID));
        DataTable table = new DataTable();

        return(table = myProc.executeReader());
    }
Beispiel #16
0
    public DataTable mutualFriends(string user_id, string visitedUser_Id)
    {
        storedProcedure myProc = new storedProcedure("mutualFriends");

        myProc.addParam(new paramter("@user_id", user_id));
        myProc.addParam(new paramter("@visitedUser_Id", visitedUser_Id));
        DataTable table = new DataTable();

        return(table = myProc.executeReader());
    }
Beispiel #17
0
    public DataTable checkIfFriend(string user_id, string friend_id)
    {
        storedProcedure myProc = new storedProcedure("checkIfFriend");

        myProc.addParam(new paramter("@user_id", user_id));
        myProc.addParam(new paramter("@friend_id", friend_id));
        DataTable table = new DataTable();

        return(table = myProc.executeReader());
    }
Beispiel #18
0
    private void configure()
    {
        storedProcedure myProcReader = new storedProcedure("getAllMajors");
        DataTable dt = myProcReader.executeReader();

            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    String majorName = dr["major_name"].ToString();
                    this.majorsList.Add(majorName);
                }
            }

        else
            {
                Console.WriteLine("No rows found.");
            }
    }
Beispiel #19
0
    private void configure()
    {
        storedProcedure myProcReader = new storedProcedure("getAllMajors");
        DataTable       dt           = myProcReader.executeReader();


        if (dt.Rows.Count > 0)
        {
            foreach (DataRow dr in dt.Rows)
            {
                String majorName = dr["major_name"].ToString();
                this.majorsList.Add(majorName);
            }
        }

        else
        {
            Console.WriteLine("No rows found.");
        }
    }
Beispiel #20
0
 public DataTable GetUserList()
 {
     DataTable table = new DataTable();
         storedProcedure myProc = new storedProcedure("GetUserList");
         return table = myProc.executeReader();
 }
Beispiel #21
0
 public DataTable getAllUsernames()
 {
     storedProcedure myProc = new storedProcedure("getAllUsernames");
     DataTable table = new DataTable();
     return table = myProc.executeReader();
 }