Пример #1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            string username = tbUsername.Text;
            string password = tbPassword.Text;
            //Do parsing, verification and checks on login information.

            //Check to see if the user exists and if the information is correct.
            //i.e. int isUserInformationCorrect(username, password)
            //If this user exists and data is correct then get their user data as a usermodel opject.
            UserModel userData = new UserModel(username, password);//For now just create a new user with this information

            SectionSelectionWindow sectionSelectionWindow = new SectionSelectionWindow(userData);
            this.Visible = false;
            sectionSelectionWindow.ShowDialog(this);

            tbUsername.Text = "";
            tbPassword.Text = "";
            this.Visible = true;
        }
Пример #2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            string username = tbUsername.Text;
            string password = tbPassword.Text;
            //Do parsing, verification and checks on login information.

            //Check to see if the user exists and if the information is correct.
            //i.e. int isUserInformationCorrect(username, password)
            //If this user exists and data is correct then get their user data as a usermodel opject.
            UserModel userData = new UserModel(username, password);//For now just create a new user with this information

            SectionSelectionWindow sectionSelectionWindow = new SectionSelectionWindow(userData);

            this.Visible = false;
            sectionSelectionWindow.ShowDialog(this);

            tbUsername.Text = "";
            tbPassword.Text = "";
            this.Visible    = true;
        }