コード例 #1
0
        private void btnSalesReportBack_Click(object sender, EventArgs e)
        {
            AdminMenuForm admin = new AdminMenuForm();

            this.Hide();
            admin.Show();
        }
コード例 #2
0
ファイル: AdminInventory.cs プロジェクト: Jonnyas93/PHP-SRePs
        private void btnAdminInventoryBack_Click(object sender, EventArgs e)
        {
            AdminMenuForm admin = new AdminMenuForm();

            this.Hide();
            admin.Show();
        }
コード例 #3
0
ファイル: staffPosForm.cs プロジェクト: Jonnyas93/PHP-SRePs
        private void btnStaffPosLogout_Click(object sender, EventArgs e)
        {
            AdminMenuForm adminForm = new AdminMenuForm();

            this.Hide();
            adminForm.Show();
        }
コード例 #4
0
        private void btnLogin_Click(object sender, EventArgs e)

        {
            sqlite_conn = CreateConnection();

            SQLiteDataReader sqlite_dataReader;
            SQLiteCommand    sqlite_cmd;

            sqlite_cmd = sqlite_conn.CreateCommand();


            userName = txtLoginUsername.Text;
            password = txtLoginPassword.Text;

            /* sqlite_cmd.CommandText = String.Format( "SELECT count(*) FROM user WHERE user_name = {0}",userName);
             * int count = Convert.ToInt32(sqlite_cmd.ExecuteScalar());
             * if (count == 1)
             * {*/
            sqlite_cmd.CommandText = String.Format("SELECT password FROM User WHERE user_name = '{0}'", userName);
            sqlite_dataReader      = sqlite_cmd.ExecuteReader();
            while (sqlite_dataReader.Read())
            {
                string correctPassword = sqlite_dataReader.GetString(0);
                if (correctPassword == password)
                {
                    AdminMenuForm adminForm = new AdminMenuForm();
                    this.Hide();
                    adminForm.Show();
                }
                else
                {
                    MessageBox.Show("Incorrect Password...!");
                }
            }
            sqlite_conn.Close();

            /*}
             * else
             * {
             *  MessageBox.Show("Incorrect Username...!");
             * }*/
        }