Esempio n. 1
0
        private void btnStudentLogout_Click(object sender, EventArgs e)
        {
            this.Hide();
            fileMovement file = new fileMovement();

            file.Show();
        }
Esempio n. 2
0
        private void btnSignUp_Click(object sender, EventArgs e)
        {
            string userName     = txtSignUpUserName.Text;
            string userPassword = txtSignUpPassword.Text;

            if (userName.Equals(""))
            {
                MessageBox.Show("Please enter your Username..!!");
            }
            else if (userPassword.Equals(""))
            {
                MessageBox.Show("Please enter your Password..!!");
            }
            else
            {
                SqlCommand insertCommand = new SqlCommand("insert into UserSignUp(Username,Password) values(@userName,@userPassword)");

                insertCommand.Parameters.AddWithValue("@userName", userName);
                insertCommand.Parameters.AddWithValue("@userPassword", userPassword);


                int row = objDBAccess.executeQuery(insertCommand);

                if (row == 1)
                {
                    MessageBox.Show("Account is created to successfully..!!");

                    this.Hide();
                    fileMovement home = new fileMovement();
                    home.Show();
                }
                else
                {
                    MessageBox.Show("Error Occured while creating your account.Try again..!!");
                }
            }
        }