public void GetUserFriends(int Id)
    {
        string getFriendQuery = "Select * FROM [User] where Id IN (SELECT MyId as Id FROM Friends WHERE FriendId='" + Id + "' AND FriendStatus=1 UNION SELECT FriendId as Id FROM Friends WHERE MyId='" + Id + "' AND FriendStatus=1) ";

        dt = dbClass.ConnectDataBaseReturnDT(getFriendQuery);
        if (dt.Rows.Count > 0)
        {
            FreindList.DataSource = dt;
            FreindList.DataBind();
        }
    }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            FreindList obj = new FreindList();

            obj.Add("Eeny");
            obj.Add("Meeny");
            obj.Add("Miny");
            obj.Remove("Eeny");
            obj.PrintAll();

            Console.WriteLine($"{obj.Capacity}");
            obj.Capacity = 10;
            Console.WriteLine($"{obj.Capacity}");

            Console.WriteLine($"{obj[0]}");
            obj[0] = "Moe";
            obj.PrintAll();
        }