public ProcesOverzichtViewModel(MainViewModel main)
            : base(main)
        {
            selectedStudent = new Object();
            List = new Dictionary<object, WStudent>();
            List<WStage> stages = new WStored().SearchStage("", "", false);

            List<WStudent> studenten = new List<WStudent>();

            for (int i = 0; i < stages.Count; i++)
            {
                if (stages[i].studentset != null)
                {
                    bool contains = false;
                    for (int j = 0; j < studenten.Count; j++)
                    {
                        if (stages[i].studentset.getSet() == studenten[j].getSet())
                        {
                            contains = true;
                            break;
                        }
                    }

                    if (!contains)
                    {
                        studenten.Add(stages[i].studentset);
                    }
                }
                if (stages[i].studentset2 != null)
                {
                    bool contains = false;
                    for (int j = 0; j < studenten.Count; j++)
                    {
                        if (stages[i].studentset2.getSet() == studenten[j].getSet())
                        {
                            contains = true;
                            break;
                        }
                    }

                    if (!contains)
                    {
                        studenten.Add(stages[i].studentset2);
                    }
                }
            }

            List = studenten.ToDictionary(t => (Object)new
                          {
                              MailTo = false,
                              Email = t.Email,
                              EmailURL = "mailto:" + t.Email,
                              StudentNaam = t.Achternaam + ", " + t.Voornaam,
                              Gegevens = "Adres komt hier",
                              Stageopdracht = true,
                              Feedback = "Geen",
                              Docent = "Docent"
                          }, t => t);
        }
Exemple #2
0
        public MailViewModel(MainViewModel main, PropertyChanged last, mailType optie)
            : base(main,last)
        {
            type = optie;

            To = "";
            SetMessage();
        }
 public DemoNieuwKoppelViewModel(MainViewModel main)
     : base(main)
 {
     SearchString = "";
     SearchOpleiding = "";
     FillView();
     OpleidingStack = (from opleiding in new WStored().SearchOpleidingSet() select opleiding.Naam).ToList();
 }
 public MailViewModel(MainViewModel main, List<String> emails)
     : this(main)
 {
     if (emails != null)
     {
         for (int i = 0; i < emails.Count; i++)
         {
             To += emails[i]+" ";
         }
     }
 }
Exemple #5
0
 public MailViewModel(MainViewModel main, PropertyChanged last, List<String> emails, mailType optie)
     : this(main, last, optie)
 {
     if (emails != null)
     {
         for (int i = 0; i < emails.Count; i++)
         {
             To += emails[i] + " ";
         }
     }
 }
 public MailViewModel(MainViewModel main)
     : base(main)
 {
     To = "";
     Message = "Beste student,\n\n" +
         "Met deze mail vragen wij vriendelijk om je gegevens in te vullen in dit web formulier\n" +
         "%webkey%\n\n\n" +
         "Met vriendelijke groeten,\n" +
         "Katinka Janssen\n" +
         "Stagecoördinator AI&I\n" +
         "Avans Hogeschool 's-Hertogenbosch";
 }
Exemple #7
0
 public ZoekViewModel(MainViewModel main, PropertyChanged last, String zoekString, Object o)
     : this(main, last)
 {
     try
     {
         s = (internships)o;
     }
     catch(Exception e)
     {
         // Gaat fout
     }
     //stype = type;
     SearchString = zoekString;
 }
Exemple #8
0
 public ZoekViewModel(MainViewModel main,PropertyChanged last)
     : base(main,last)
 {
     OpleidingStack = (from opleiding in new WStored().SearchOpleidingSet() select opleiding.name).ToList();
     switch(stype)
     {
         case SearchType.Docenten:
             searchDocent();
             break;
         case SearchType.Studenten:
             searchStudent();
             break;
     }
 }
Exemple #9
0
        public MailViewModel(MainViewModel main, PropertyChanged last, List<String> emails, mailType optie, String input)
            : this(main, last, optie)
        {
            if (emails != null)
            {
                for (int i = 0; i < emails.Count; i++)
                {
                    To += emails[i] + " ";
                }
            }

            messageBeoordeling = input;
            SetMessage();
        }
 public DocentenOverzichtViewModel(MainViewModel main, PropertyChanged last)
     : base(main, last)
 {
     TeacherList = new Dictionary<object, teachers>();
     TeacherList = new WStored().SearchDocentSet("").ToDictionary(t => (Object)new
     {
         Voornaam = t.users.name,
         Achternaam = t.users.surname,
         Straatnaam = t.adresses.street,
         Huisnummer = t.adresses.housenumber,
         Woonplaats = t.adresses.place,
         Telefoonnummer = t.users.phonenumber,
         Email = t.users.email,
     }, t => t);
 }
        public KoppelViewModel(MainViewModel main)
            : base(main)
        {
            Main = main;
            list = new Dictionary<object, WDocent>();
            list = (new WStored().SearchDocentSet("").ToDictionary(t => (Object)new
                    {
                        Voornaam = t.Voornaam,
                        Achternaam = t.Achternaam,
                        Uren = t.Rest(),
                        Kennisgebied = t.tool_vaardigheidset.First().Naam,
                        Afstand = 500
                    }, t => t));

            GridContents = list.Keys.ToList();
        }
        public AppBootstrapper()
            : base()
        {
            windowManager = new WindowManager();
            defaultFactory = new DefaultFactory();
            smEntities = new stagemanagerEntities();

            entityService = new EntityService(defaultFactory, smEntities);
            viewController = new ViewController();

            // Observer observable
            MainViewModel mainViewModel = new MainViewModel();
            mainViewModel.SomethingHappened += viewController.HandleEvent;

            // Show Window
            windowManager.ShowWindow(mainViewModel);
        }
        public KoppelViewModel(MainViewModel main, PropertyChanged last, internships stage)
            : this(main, last)
        {
            list = new Dictionary<object, DocentValue>();
            int ID = unchecked((int)stage.id);
            Stage = stage;
            list = (new ImportanceChecker().checkImportance(ID).ToDictionary(t => (Object)new
            {
                waarde = t.value,
                naam = t.TeacherInfo.users.name + " " + t.TeacherInfo.users.surname,
                aantalkennis = t.numberOfKnowledge,
                kennis = t.sameKnowledgeString,
                afstand = t.distance,
                vervoer = t.TeacherInfo.transport.name,
                tijdover = t.timeleftafter,

            }, t => t));

            GridContents = list.Keys.ToList();
        }
        public KoppelViewModel(MainViewModel main,PropertyChanged last, String teacher)
            : base(main,last)
        {
            Main = main;

            list = new Dictionary<object, DocentValue>();

            list = (new ImportanceChecker().checkImportance(2).ToDictionary(t => (Object)new
            {
                waarde = t.value,
                naam = t.TeacherInfo.users.name + " " + t.TeacherInfo.users.surname,
                aantalkennis = t.numberOfKnowledge,
                kennis = t.sameKnowledgeString,
                afstand = t.distance,
                tijdover = t.timeleftafter,

            }, t => t));

            GridContents = list.Keys.ToList();
        }
 public StudentenOverzichtViewModel(MainViewModel main, PropertyChanged last)
     : base(main,last)
 {
     List = new Dictionary<object, students>();
     List = new WStored().SearchStudentSet("", "").ToDictionary(t => (Object)new
     {
         Studentnummer = t.studentnumber,
         Voornaam = t.users.name,
         Achternaam = t.users.surname,
         Opleiding = t.users.students.education.name,
         Telefoonnummer = t.users.phonenumber,
         Voldoet = t.users.students.meets,
         Email = t.users.email,
         EmailURL = t.users.email,
         Straatnaam = t.users.students.adresses.street,
         Huisnummer = t.users.students.adresses.housenumber,
         Postcode = t.users.students.adresses.zipcode,
         Woonplaats = t.users.students.adresses.place,
     }, t => t);
 }
Exemple #16
0
 public ZoekViewModel(MainViewModel main, String zoekString)
     : this(main)
 {
     SearchString = zoekString;
 }
Exemple #17
0
 public ZoekViewModel(MainViewModel main)
     : base(main)
 {
     OpleidingStack = (from opleiding in new WStored().SearchOpleidingSet() select opleiding.Naam).ToList();
     searchStage();
 }
 public StageopdrachtViewModel(MainViewModel main,PropertyChanged last, internships stage)
     : this(main,last)
 {
     Stage = stage;
 }
 public StageopdrachtViewModel(MainViewModel main,PropertyChanged last)
     : base(main,last)
 {
 }
 public KoppelingenViewModel(MainViewModel main)
     : base(main)
 {
     koppelGridContents = new List<object>();
     searchKoppelingen();
 }
 public DocentViewModel(MainViewModel main,PropertyChanged last, teachers docent)
     : this(main,last)
 {
     Docent = docent;
 }
 public DocentViewModel(MainViewModel main)
     : base(main)
 {
 }
Exemple #23
0
        public void Connect()
        {
            Login myLogin = new Login();
            administrators user = myLogin.Connect(username, password);

            if (user != null)
            {
                // Observer observable
                ViewController viewController = new ViewController();
                MainViewModel mainViewModel = new MainViewModel(user);
                mainViewModel.SomethingHappened += viewController.HandleEvent;
                WindowManager windowManager = new WindowManager();
                mainViewModel.ChangeButton(decideWindowState());
                windowManager.ShowWindow(mainViewModel);
                WVisible = Visibility.Hidden;
            }
            else
            {
                Visible =true;
            }
        }
Exemple #24
0
 public MailViewModel(MainViewModel main, PropertyChanged last)
     : this(main, last, mailType.student)
 {
 }
        public GegevensOverzichtViewModel(MainViewModel main, PropertyChanged last)
            : base(main, last)
        {
            stagemanagerEntities smE = new stagemanagerEntities();
            List<students> students = smE.students.ToList();
            List = new Dictionary<object, students>();
            List<students> studenten = new List<students>();

            for (int i = 0; i < students.Count; i++)
            {
                users thisUser = new users
                {
                    name = "",
                    surname = "",
                    phonenumber = "",
                    email = "",
                };

                adresses thisAdresses = new adresses
                {
                    street = "",
                    housenumber = "",
                    place = "",
                    zipcode = "",
                };

                adresses companyAdresses = new adresses
                {
                    street = "",
                    housenumber = "",
                    place = "",
                    zipcode = "",
                };

                companies thisCompany = new companies
                {
                     name ="",
                     website = "",
                     phonenumber = "",
                     adresses = companyAdresses
                };

                users superviserUser = new users
                {
                    name = "",
                    surname = "",
                    phonenumber = "",
                    email = "",
                };

                supervisor thisSupervisor = new supervisor
                {
                    users = superviserUser,
                    companies = thisCompany
                };

                List<students_internships> myList = new List<students_internships>();
                myList.Add(new students_internships
                {
                internships = new internships
                        {
                            supervisor = thisSupervisor
                        }
                    });

                students thisStudent = new students
                {
                    users = thisUser,
                    meets = "",
                    adresses = thisAdresses,
                    studentnumber = 0,
                    students_internships = myList
                };

                if (students[i].studentnumber != null)
                {
                    thisStudent.studentnumber = students[i].studentnumber;
                }

                if (students[i].meets != null)
                {
                            thisStudent.meets = students[i].meets;
                }

                if (students[i].users == null)
                {
                }
                else
                {
                    if (students[i].users.name != null)
                    {

                        thisStudent.users.name = students[i].users.name;
                    }

                    if (students[i].users.surname != null)
                    {
                        thisStudent.users.surname = students[i].users.surname;
                    }

                    if (students[i].users.email != null)
                    {
                        thisStudent.users.email = students[i].users.email;
                    }

                    if (students[i].users.phonenumber != null)
                    {
                        thisStudent.users.phonenumber = students[i].users.phonenumber;
                    }
                }

                if (students[i].adresses == null)
                {
                    thisStudent.adresses.street = "";
                    thisStudent.adresses.housenumber = "";
                    thisStudent.adresses.zipcode = "";
                    thisStudent.adresses.place = "";
                }
                else
                {
                    if (students[i].adresses.street != null)
                    {
                        thisStudent.adresses.street = students[i].adresses.street;
                    }

                    if (students[i].adresses.housenumber != null)
                    {
                        thisStudent.adresses.housenumber = students[i].adresses.housenumber;
                    }

                    if (students[i].adresses.zipcode != null)
                    {
                        thisStudent.adresses.zipcode = students[i].adresses.zipcode;
                    }

                    if (students[i].adresses.place != null)
                    {
                        thisStudent.adresses.place = students[i].adresses.place;
                    }
                }

                if (students[i].students_internships != null && students[i].students_internships.Count > 0 && students[i].students_internships.First().internships != null)
                {

                    if (students[i].students_internships.First().internships.supervisor != null)
                    {
                        if (students[i].students_internships.First().internships.supervisor.users.name != null)
                        {
                            thisStudent.students_internships.First().internships.supervisor.users.name = students[i].students_internships.First().internships.supervisor.users.name;
                        }

                        if (students[i].students_internships.First().internships.supervisor.users.phonenumber != null)
                        {
                            thisStudent.students_internships.First().internships.supervisor.users.phonenumber = students[i].students_internships.First().internships.supervisor.users.phonenumber;
                        }

                        if (students[i].students_internships.First().internships.supervisor.companies != null)
                        {
                            if (students[i].students_internships.First().internships.supervisor.companies.name != null)
                            {
                                thisStudent.students_internships.First().internships.supervisor.companies.name = students[i].students_internships.First().internships.supervisor.companies.name;
                            }

                            if (students[i].students_internships.First().internships.supervisor.companies.phonenumber != null)
                            {
                                thisStudent.students_internships.First().internships.supervisor.companies.phonenumber = students[i].students_internships.First().internships.supervisor.companies.phonenumber;
                            }

                            if (thisStudent.students_internships.First().internships.supervisor.companies.adresses != null)
                            {
                                if (students[i].students_internships.First().internships.supervisor.companies.adresses.street != null)
                                {
                                    thisStudent.students_internships.First().internships.supervisor.companies.adresses.street = students[i].students_internships.First().internships.supervisor.companies.adresses.street;
                                }

                                if (students[i].students_internships.First().internships.supervisor.companies.adresses.housenumber != null)
                                {
                                    thisStudent.students_internships.First().internships.supervisor.companies.adresses.housenumber = students[i].students_internships.First().internships.supervisor.companies.adresses.housenumber;
                                }

                                if (students[i].students_internships.First().internships.supervisor.companies.adresses.zipcode != null)
                                {
                                    thisStudent.students_internships.First().internships.supervisor.companies.adresses.zipcode = students[i].students_internships.First().internships.supervisor.companies.adresses.zipcode;
                                }

                                if (students[i].students_internships.First().internships.supervisor.companies.adresses.place != null)
                                {
                                    thisStudent.students_internships.First().internships.supervisor.companies.adresses.place = students[i].students_internships.First().internships.supervisor.companies.adresses.place;
                                }
                            }

                            if (students[i].students_internships.First().internships.supervisor.companies.phonenumber != null)
                            {
                                thisStudent.students_internships.First().internships.supervisor.companies.phonenumber = students[i].students_internships.First().internships.supervisor.companies.phonenumber;
                            }

                            if (students[i].students_internships.First().internships.supervisor.companies.website != null)
                            {
                                thisStudent.students_internships.First().internships.supervisor.companies.website = students[i].students_internships.First().internships.supervisor.companies.website;
                            }
                        }
                    }
                }

                studenten.Add(thisStudent);

            }

            List = studenten.ToDictionary(t => (Object)new
            {
                Studentnummer = t.studentnumber,
                Voornaam = t.users.name,
                Achternaam = t.users.surname,
                Email = t.users.email,
                EmailURL = t.users.email,
                Telefoonnummer = t.users.phonenumber,
                ToestEx = t.meets,
                Straatnaam = t.adresses.street,
                Nummer = t.adresses.housenumber,
                Postcode = t.adresses.zipcode,
                Plaats = t.adresses.place,
                Bedrijf = t.students_internships.First().internships.supervisor.companies.name,
                BTelefoon = t.students_internships.First().internships.supervisor.companies.phonenumber,
                Website = t.students_internships.First().internships.supervisor.companies.website,
                BStraat = t.students_internships.First().internships.supervisor.companies.adresses.street,
                BNummer = t.students_internships.First().internships.supervisor.companies.adresses.housenumber,
                BPostcode = t.students_internships.First().internships.supervisor.companies.adresses.zipcode,
                BPlaats = t.students_internships.First().internships.supervisor.companies.adresses.place,
                Bedrijfsbegeleider = t.students_internships.First().internships.supervisor.users.name + " " + t.students_internships.First().internships.supervisor.users.surname,
                BegTelefoon = t.students_internships.First().internships.supervisor.users.phonenumber
            }, t => t);
        }
 public PropertyChanged(MainViewModel main)
 {
     Main = main;
 }
 public KoppelViewModel(MainViewModel main, WStage stage)
     : this(main)
 {
     Stage = stage;
 }
 public ProcesOverzichtViewModel(MainViewModel main, PropertyChanged last)
     : base(main, last)
 {
     refresh();
 }
 public DocentViewModel(MainViewModel main, WDocent docent)
     : this(main)
 {
     Docent = docent;
 }
 public DocentViewModel(MainViewModel main, PropertyChanged last)
     : base(main,last)
 {
 }