예제 #1
0
        private void load_Page()
        {
            //Group_Name_Text,Group_ID_Text,Group_Description_Text

            List <string> group = GlobalVariables.returnGroupInfo(GlobalVariables.selectedGroup);

            Group_Name_Text.Text        = group[0];
            Group_ID_Text.Text          = group[1];
            Group_Description_Text.Text = group[2];
        }
        public static List <string> returnListGroupsIn(int personID)
        {
            List <int>       groupIDs    = new List <int>();
            List <string>    returnGroup = new List <string>();
            string           sql         = $"SELECT GroupID FROM GroupsIn WHERE PersonID == {personID}";
            SQLiteCommand    command     = new SQLiteCommand(sql, GlobalVariables.connection);
            SQLiteDataReader reader      = command.ExecuteReader();

            while (reader.Read())
            {
                groupIDs.Add(int.Parse(reader["GroupID"].ToString()));
            }
            foreach (int groupID in groupIDs)
            {
                returnGroup.Add(GlobalVariables.returnGroupInfo(groupID)[0]);
            }
            return(returnGroup);
        }