Esempio n. 1
0
 private void View_Click(object sender, RoutedEventArgs e)
 {
     if (VM.SelectedShift is null)
     {
         MessageBox.Show("Choose A Shift");
     }
     else
     {
         //enter worker page as admin
         Window w2 = new Worker_page1(service, VM.SelectedShift.shift_id);
         w2.Show();
         this.Close();
     }
 }
Esempio n. 2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            service = new Service();
            string shift_idd = DateTime.Now.ToString("yyyyMMdd-HHMMss");

            service.shift = new Shift(shift_idd, txtUser.Text);
            if (service.checklogin(txtUser.Text, pswd.Text))
            {
                service.worker = service.getworker(txtUser.Text);
                Window win2 = new Worker_page1(service, null);
                win2.Show();
                Close();
            }
        }