Esempio n. 1
0
        private void UserCredentialsSignIn_Click(object sender, EventArgs e)
        {
            SignIn f = new SignIn();

            f.Show();
        }
Esempio n. 2
0
        internal void SignInOps()
        {
            StartDB();

            SignIn SignIn = new SignIn();
            DocuVault DocuVault = new DocuVault();

            string userid = "";
            string pwd = "";

            string sqlstmt = "SELECT COUNT(*) FROM DMSuser WHERE user_id=@user_id AND passwd=@passwd;";
            SqlConnection connection = new SqlConnection(connectionString);
            SqlCommand command = new SqlCommand(sqlstmt, connection);

            //parameterize user_id
            command.Parameters.Add("@user_id", SqlDbType.VarChar, 10);
            userid = SignIn.txtUserID.Text;
            command.Parameters["@user_id"].Value = userid;

            //parameterize passwd
            command.Parameters.Add("@passwd", SqlDbType.VarChar, 50);
            pwd = SignIn.txtPwd.Text;
            command.Parameters["@passwd"].Value = pwd;

            //db execution
            connection.Open();
            command.ExecuteNonQuery();
            connection.Close();
            int credential = command.ExecuteNonQuery();
            //allow signin or not
            if (credential != 1)
            {
                DlgOps.LoginFailed();
            }
            else
            {
                DocuVault.DocuReportViewer.RefreshReport();
            }
        }
Esempio n. 3
0
 private void UserCredentialsSignIn_Click(object sender,EventArgs e)
 {
     SignIn f = new SignIn();
     f.Show();
 }