Exemple #1
0
 public void DropFilters()
 {
     dAdapt = new SqlDataAdapter("SELECT Workers.[Id], Workers.[Фамилия],Workers.[Имя],Workers.[Отчество],FORMAT(Workers.[Дата поступления],'dd-mm-yyyy') AS [Дата поступления]," +
                                 "Workers.[Должность],Workers.[Зарплата],Department.[Отдел],Department.[Адрес], Courses.[Курс], Courses.[Место обучения] " +
                                 "FROM Workers JOIN Department ON Workers.[Номер отдела] = Department.[Номер] JOIN Courses ON Workers.[Номер пр. курса] = Courses.[Номер курса]", connectionString);
     Filter = null;
 }
Exemple #2
0
 private void DoFilteration_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         TableFilter filter = new TableFilter
         {
             Course     = coursefilt.Text,
             Department = departmentfilt.Text
         };
         if (!String.IsNullOrEmpty(minsal.Text))
         {
             filter.MinSalary = Int32.Parse(minsal.Text);
         }
         if (!String.IsNullOrEmpty(maxsal.Text))
         {
             filter.MaxSalary = Int32.Parse(maxsal.Text);
         }
         db.Filter = filter;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }