コード例 #1
0
        //back to main dashboard window
        private void BtnMain_Click(object sender, RoutedEventArgs e)
        {
            DashboardWindow dw = new DashboardWindow();

            dw.Show();
            this.Close();
        }
コード例 #2
0
        // CHEKING USER PAROL, PASSWORD  AND sTATUS OFF USERS
        private void BtnSignIn_Click(object sender, RoutedEventArgs e)
        {
            if (_context.Managements.Any(r => r.UserName == TxtLogin.Text && r.Parol == TxtPassword.Password && r.Position == Positions.Admin))

            {
                DashboardWindow dw = new DashboardWindow();
                dw.BtnDailyReports.IsEnabled = true;
                dw.BtnManagement.IsEnabled   = true;
                dw.Show();
                this.Close();
            }
            else if (_context.Managements.Any(r => r.UserName == TxtLogin.Text && r.Parol == TxtPassword.Password && r.Position == Positions.User))
            {
                DashboardWindow dw = new DashboardWindow();
                dw.BtnDailyReports.IsEnabled = false;
                dw.BtnManagement.IsEnabled   = false;
                dw.Show();
                this.Close();
            }

            else
            {
                MessageBox.Show("İstifadəçi adı və ya şifrə yanlışdır");
            }
        }