예제 #1
0
        private void btnCustomers_Click(object sender, RoutedEventArgs e)
        {
            this.Hide();
            Verkopers verkopers = new Verkopers();

            verkopers.Show();
            this.Close();
        }
예제 #2
0
        private void MenuItem_Click_2(object sender, RoutedEventArgs e)
        {
            this.Hide();

            Verkopers verkopers = new Verkopers();

            verkopers.Show();



            this.Close();
        }
예제 #3
0
        private void Login()
        {
            using (ProjectContext ctx = new ProjectContext())
            {
                string pass   = Encryptor(txtPassword.Password);
                var    result = ctx.Employees.FirstOrDefault(c => c.UserName == txtUserName.Text && c.Password == pass);
                if (result == null)
                {
                    MessageBox.Show("fout paswoord of username");
                    txtUserName.Focus();
                }

                if (result != null && result.Function == "1")
                {
                    this.Hide();

                    ScrAdministrator scrAdministrator = new ScrAdministrator();

                    scrAdministrator.Show();


                    this.Close();
                }


                if (result != null && result.Function == "2")
                {
                    this.Hide();
                    magazijnTab magazijnTab = new magazijnTab();
                    magazijnTab.Show();
                    this.Close();
                }
                if (result != null && result.Function == "3")
                {
                    this.Hide();
                    Verkopers verkopers = new Verkopers();

                    verkopers.Show();
                    this.Close();
                }
            }
        }