Beispiel #1
0
        private void Button_Click_Delete(object sender, RoutedEventArgs e)
        {
            Button btn = (Button)sender;

            db.deleteSession(((SessionPanel)btn.DataContext).Session_ID);

            List <SessionPanel> panel     = new List <SessionPanel>();
            List <SessionPanel> panelacrh = new List <SessionPanel>();

            var names = db.getNames();

            foreach (var name in names)
            {
                foreach (var ses in db.getSessionByName(name))
                {
                    if (ses.IsArchived)
                    {
                        panelacrh.Add(new SessionPanel()
                        {
                            Manager = name, Sessions = ses.Session_Name, Session_ID = ses.ID_Session
                        });
                    }
                    else
                    {
                        panel.Add(new SessionPanel()
                        {
                            Manager = name, Sessions = ses.Session_Name, Session_ID = ses.ID_Session
                        });
                    }
                }
            }

            active.ItemsSource   = panel;
            archived.ItemsSource = panelacrh;
        }
Beispiel #2
0
        public AdminInterface()
        {
            db = new DBWork();
            InitializeComponent();
            List <SessionPanel> panel     = new List <SessionPanel>();
            List <SessionPanel> panelacrh = new List <SessionPanel>();
            var names = db.getNames();


            foreach (var name in names)
            {
                foreach (var ses in db.getSessionByName(name))
                {
                    if (ses.IsArchived)
                    {
                        panelacrh.Add(new SessionPanel()
                        {
                            Manager = name, Sessions = ses.Session_Name, Session_ID = ses.ID_Session, Archieved = ses.IsArchived
                        });
                    }
                    else
                    {
                        panel.Add(new SessionPanel()
                        {
                            Manager = name, Sessions = ses.Session_Name, Session_ID = ses.ID_Session, Archieved = ses.IsArchived
                        });
                    }
                }
            }

            active.ItemsSource   = panel;
            archived.ItemsSource = panelacrh;
        }
Beispiel #3
0
        private void ComboBox_Loaded(object sender, RoutedEventArgs e)
        {
            ComboBox comboBox = sender as ComboBox;

            var names = db.getNames();

            comboBox.ItemsSource   = names;
            comboBox.SelectedIndex = 0;
        }
Beispiel #4
0
        private void user_DataChanged(object sender, EventArgs e)
        {
            List <Man> items = new List <Man>();
            var        names = db.getNames();

            foreach (var name in names)
            {
                items.Add(new Man()
                {
                    PersonName = name
                });
            }
            peopleNames.ItemsSource = items;
        }
Beispiel #5
0
        public Settings()
        {
            db = new DBWork();
            InitializeComponent();
            List <Man> items = new List <Man>();
            var        names = db.getNames();

            foreach (var name in names)
            {
                items.Add(new Man()
                {
                    PersonName = name
                });
            }
            peopleNames.ItemsSource = items;
        }
        private void CreateSession_DataChanged(object sender, EventArgs e)
        {
            List <Session> panel = new List <Session>();

            var names = db.getNames();

            foreach (var ses in db.getSessionByName(userName))
            {
                if (!ses.IsArchived)
                {
                    panel.Add(new Session()
                    {
                        Session_Name = ses.Session_Name, ID_Session = ses.ID_Session, IsArchived = ses.IsArchived
                    });
                }
            }

            Session.ItemsSource = panel;
        }
Beispiel #7
0
        private void CreateSession_DataChanged(object sender, EventArgs e)
        {
            List <SessionPanel> panel     = new List <SessionPanel>();
            List <SessionPanel> panelacrh = new List <SessionPanel>();

            db = new DBWork();

            active.ItemsSource   = null;
            archived.ItemsSource = null;

            var names = db.getNames();


            foreach (var name in names)
            {
                var sessions = db.getSessionByName(name);
                foreach (var ses in sessions)
                {
                    if (ses.IsArchived)
                    {
                        panelacrh.Add(new SessionPanel()
                        {
                            Manager = name, Sessions = ses.Session_Name, Session_ID = ses.ID_Session
                        });
                    }
                    else
                    {
                        panel.Add(new SessionPanel()
                        {
                            Manager = name, Sessions = ses.Session_Name, Session_ID = ses.ID_Session
                        });
                    }
                }
            }

            active.ItemsSource   = panel;
            archived.ItemsSource = panelacrh;
        }