Exemple #1
0
 private void allRoom_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var rooms = Querys.readRoom();
         mainWindow.successfulConnection();
         SimpleQueryResult = new SimpleQueryResult(rooms);
         NavigationService.Navigate(SimpleQueryResult);
         MainWin.Title = "Все кабинеты";
     }
     catch (Exception ex)
     {
         mainWindow.errorConnection(ex);
     }
 }
Exemple #2
0
 private void allDepartment_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var departments = Querys.readDepartment();
         mainWindow.successfulConnection();
         SimpleQueryResult = new SimpleQueryResult(departments);
         NavigationService.Navigate(SimpleQueryResult);
         MainWin.Title = "Все отделы";
     }
     catch (Exception ex)
     {
         mainWindow.errorConnection(ex);
     }
 }
Exemple #3
0
 private void allEmploy_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var employers = Querys.readEmployers();
         mainWindow.successfulConnection();
         SimpleQueryResult = new SimpleQueryResult(employers);
         NavigationService.Navigate(SimpleQueryResult);
         MainWin.Title = "Все сотрудники";
     }
     catch (Exception ex)
     {
         mainWindow.errorConnection(ex);
     }
 }
Exemple #4
0
 private void allPositions_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var positions = Querys.readPosition();
         mainWindow.successfulConnection();
         SimpleQueryResult = new SimpleQueryResult(positions);
         NavigationService.Navigate(SimpleQueryResult);
         MainWin.Title = "Все должностии";
     }
     catch (Exception ex)
     {
         mainWindow.errorConnection(ex);
     }
 }
Exemple #5
0
        private void findEmployBySurname_Click(object sender, RoutedEventArgs e)
        {
            Find.SearchEngine searchEngine = new Find.SearchEngine();
            string            str;
            bool hasInput = searchEngine.TryGetSurname("Поиск сотрудника по фамилии", out str);

            if (hasInput)
            {
                var surnmae = Querys.employBySurname(str);
                if (surnmae != null && HasRows(surnmae))
                {
                    SimpleQueryResult = new SimpleQueryResult(surnmae);
                    NavigationService.Navigate(SimpleQueryResult);
                }
                else
                {
                    //searchEngine.checkError("Поиск сотрудника по номеру кабинета");
                }
            }
        }