示例#1
0
        private void btnViewBooks_Click(object sender, EventArgs e)
        {
            if (Staff.Position != null || Staff.Position != "")
            {
                LufkinBooks.ViewBooks = "Staff";

                #region Load Book Form
                //Make second form
                LufkinBooks lufkinBooks = new LufkinBooks();

                //Set second form's start position as same as parent form
                lufkinBooks.StartPosition = FormStartPosition.Manual;
                lufkinBooks.Location      = new Point(this.Location.X, this.Location.Y);

                //Open second dialog
                lufkinBooks.ShowDialog();

                //Set parent form's visible to true
                this.Visible = true;
                #endregion
            }
            else
            {
                MessageBox.Show("You need to be a staff to view all books!");
            }
        }
示例#2
0
        private void btnViewBooks_Click(object sender, EventArgs e)
        {
            LufkinBooks.ViewBooks = "Anyone";

            #region Load Book Form
            //Make second form
            LufkinBooks lufkinBooks = new LufkinBooks();

            //Set second form's start position as same as parent form
            lufkinBooks.StartPosition = FormStartPosition.Manual;
            lufkinBooks.Location      = new Point(this.Location.X, this.Location.Y);

            //Open second dialog
            lufkinBooks.ShowDialog();

            //Set parent form's visible to true
            this.Visible = true;
            #endregion
        }