private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Window win2 = new View_Workers(service);

            win2.Show();
            Close();
        }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (service.checklogin(txtUser.Text, pswd.Text))
     {
         MessageBox.Show("משתמש קיים");
     }
     else
     {
         DB_connector.AddNewWorker(txtUser.Text, pswd.Text);
         MessageBox.Show("Success!");
         Window w2 = new View_Workers(service);
         w2.Show();
         this.Close();
     }
 }
 private void Delete_Click(object sender, RoutedEventArgs e)
 {
     if (VM.SelectedWorker is null)
     {
         MessageBox.Show("Choose A Worker");
     }
     else
     {
         DB_connector.DeleteWorker(VM.SelectedWorker.worker_id);
         //remember to delete all shifts also
         Window w2 = new View_Workers(service);
         w2.Show();
         this.Close();
     }
 }