Exemplo n.º 1
0
 private void showDataGridView(int a)//datagrid en fonction des boutons
 {
     try
     {
         if (a == 1)
         {
             DataGrid_s.ItemsSource = null;
             DataGrid_s.ItemsSource = bl.Allcontract();
         }
         else if (a == 3)
         {
             DataGrid_s.ItemsSource = null;
             DataGrid_s.ItemsSource = bl.AllEmployee();
         }
         else if (a == 2)
         {
             DataGrid_s.ItemsSource = null;
             DataGrid_s.ItemsSource = bl.AllEmployer();
         }
         else if (a == 4)
         {
             DataGrid_s.ItemsSource = null;
             DataGrid_s.ItemsSource = bl.Allspecialization();
         }
     }
     catch (Exception)
     {
         MessageBox.Show("שגיאה", "ERROR", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Exemplo n.º 2
0
 private void showDataGridView()//show all contract
 {
     try
     {
         DataGrid_s.ItemsSource = null;
         DataGrid_s.ItemsSource = bl.Allcontract();
     }
     catch (Exception)
     {
         MessageBox.Show("שגיאה", "ERROR", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Exemplo n.º 3
0
 private void showDataGridView(int i, int id)//datagrid
 {
     try
     {
         DataGrid_s.ItemsSource = null;
         if (i == 1)
         {
             var v = from n in bl.Allcontract()
                     where n.employeeID == id
                     select n;
             DataGrid_s.ItemsSource = v;
         }
         else if (i == 2)
         {
             DataGrid_s.ItemsSource = bl.AllCONTRACT_TO_EMPLOYER(id);
         }
     }
     catch (Exception)
     {
         MessageBox.Show("שגיאה", "ERROR", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }