public static void GetMeeting()
        {
            Connect();

            ReadData("SELECT * FROM KENNISMAKINGSGESPREK");

            try
            {
                while (dr.Read())
                {
                    int id;
                    DateTime datum;
                    string tekst;
                    int account;

                    id = Convert.ToInt32(dr.GetValue(0));
                    datum = dr.GetDateTime(1);
                    tekst = dr.GetString(2);
                    account = Convert.ToInt32(dr.GetValue(3));

                    Meeting meeting = new Meeting(id, datum, tekst, account);

                    HelpHandler.AddMeeting(meeting);
                }
            }

            catch (InvalidCastException ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                Disconnect();
            }
        }
示例#2
0
 public static void AddMeeting(Meeting meeting)
 {
     meetings.Add(meeting);
 }