Пример #1
0
        private void LoginClick(object sender, RoutedEventArgs e)
        {
            LoginCredentials loginCredentials = new LoginCredentials(emailTextBox.Text, passwordTextBox.Password);
            string           cookie           = loginCredentials.Login(loginCredentials);

            if (cookie != null)
            {
                LoggedUser         loggedUser = new LoggedUser(loginCredentials, Role.Doctor, cookie);
                HospitalMainWindow window     = HospitalMainWindow.GetInstance();
                this.Close();
                window.ShowDialog();
            }
            else
            {
                MessageBox.Show("You have enetered wrong email or password!");
            }
        }