Esempio n. 1
0
        private void Tillbaka(object obj)
        {
            StartPersonal start = new StartPersonal(BusinessManager);

            TillbakaAction();
            start.ShowDialog();
        }
Esempio n. 2
0
        public void LoggaIn(object obj)
        {
            Användare A = loggaIn(användarId, Lösen);

            if (A == null)
            {
                MessageBox.Show("AnvändarIDt och lösenorder matchar inte", "Error");
            }
            else if (A.Lösenord == Lösen)
            {
                if ((A as Personal) != null)
                {
                    businessManager.InloggadPersonal = A as Personal;
                    StartPersonal startPersonal = new StartPersonal(businessManager);
                    TillbakaAction();
                    startPersonal.ShowDialog();
                }
                else if ((A as Alumn) != null)
                {
                    businessManager.InloggadAlumn = A as Alumn;
                    StartAnnan startAnnan = new StartAnnan(businessManager);
                    TillbakaAction();
                    startAnnan.ShowDialog();
                }
            }
        }
Esempio n. 3
0
        private void Spara(object obj)
        {
            MessageBoxResult result = MessageBox.Show("Vill du spara Utskickslistan såhär?", "Spara?", MessageBoxButton.YesNo);

            if (result == MessageBoxResult.Yes)
            {
                //ObservableCollection<Alumn> A = new ObservableCollection<Alumn>();

                //foreach (Alumn a in SelectListBox)
                //{
                //    Alumn alumn = BusinessManager.GetAlumn(a.AnvändarId);
                //    A.Add(alumn);
                //}

                //Alumner = A;
                spara();

                StartPersonal start = new StartPersonal(BusinessManager);
                TillbakaAction();
                start.ShowDialog();
            }
            else
            {
            }
        }
Esempio n. 4
0
        private void Spara(object obj)
        {
            MessageBoxResult result = MessageBox.Show("Vill du spara aktiviteten såhär?", "Spara?", MessageBoxButton.YesNo);

            if (result == MessageBoxResult.Yes)
            {
                spara();
                StartPersonal start = new StartPersonal(BusinessManager);
                TillbakaAction();
                start.ShowDialog();
            }
            else
            {
            }
        }
Esempio n. 5
0
        private void Redigera(object obj)
        {
            RedigeraLista redigera = new RedigeraLista(BusinessManager, Lista);

            redigera.ShowDialog();

            if (redigera.DialogResult == true)
            {
                StartPersonal start = new StartPersonal(BusinessManager);
                TillbakaAction();
                start.ShowDialog();
            }
            else if (redigera.DialogResult == false)
            {
            }
        }