예제 #1
0
        private void Back_Click(object sender, RoutedEventArgs e)
        {
            ProjectChoise p = new ProjectChoise(user);

            Close();
            p.Show();
        }
예제 #2
0
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            UsersCommand uc = new UsersCommand();

            if (await uc.InLogin(textBox.Text.Trim(), passwordBox.Password.Trim()) == 3)
            {
                Projects np = new Projects();
                Close();
                np.Show();
            }
            else
            {
                if (await uc.InLogin(textBox.Text.Trim(), passwordBox.Password.Trim()) == 2)
                {
                    UsersCommand uc2   = new UsersCommand();
                    User         user2 = await uc2.GiveUser(textBox.Text.Trim(), passwordBox.Password.Trim());

                    ProjectChoise pc = new ProjectChoise(user2);
                    Close();
                    pc.Show();
                }
                else
                {
                    if (await uc.InLogin(textBox.Text.Trim(), passwordBox.Password.Trim()) == 1)
                    {
                        UsersCommand uc1   = new UsersCommand();
                        User         user1 = await uc1.GiveUser(textBox.Text.Trim(), passwordBox.Password.Trim());

                        SelectProject sp = new SelectProject(user1);
                        sp.Show();
                        Close();
                    }
                    else
                    {
                        MessageBox.Show("Ошибка при вводе логина или пороля");
                    }
                }
            }
        }