Ejemplo n.º 1
0
        private void ProcessInterface()
        {
            //LoadInterface();

            //ShowForm();

            //UnloadInterface();
            frmInterface = new frmBooksMaster();
            frmInterface.IsLookUpMode = true;

            DialogResult result;

            result = frmInterface.ShowDialog();
            if (result == DialogResult.OK)
            {
                _bookID = frmInterface.BookID;
            }
            else
            {
                _bookID = "";
            }

            frmInterface.Close();
            frmInterface = null;
        }
Ejemplo n.º 2
0
        /**/


        public void ShowForm(string formName)
        {
            try
            {
                switch (formName)
                {
                case "UserRegistration":
                    if (frmUserRegistration == null)
                    {
                        frmUserRegistration           = new frmUserRegistration();
                        frmUserRegistration.MdiParent = this;
                        frmUserRegistration.Show();
                        frmUserRegistration.BringToFront();
                    }
                    else if (frmUserRegistration.IsDisposed == true)
                    {
                        frmUserRegistration           = new frmUserRegistration();
                        frmUserRegistration.MdiParent = this;
                        frmUserRegistration.Show();
                        frmUserRegistration.BringToFront();
                    }
                    else
                    {
                        frmUserRegistration.Activate();
                        frmUserRegistration.Show();
                        frmUserRegistration.BringToFront();
                    }
                    break;


                case "frmBooksMaster":
                    if (frmBooksMaster == null)
                    {
                        frmBooksMaster           = new frmBooksMaster();
                        frmBooksMaster.MdiParent = this;
                        frmBooksMaster.Show();
                        frmBooksMaster.BringToFront();
                    }
                    else if (frmBooksMaster.IsDisposed == true)
                    {
                        frmBooksMaster           = new frmBooksMaster();
                        frmBooksMaster.MdiParent = this;
                        frmBooksMaster.Show();
                        frmBooksMaster.BringToFront();
                    }
                    else
                    {
                        frmBooksMaster.Activate();
                        frmBooksMaster.Show();
                        frmBooksMaster.BringToFront();
                    }
                    break;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 3
0
 private void UnloadInterface()
 {
     frmInterface.Close();
     frmInterface = null;
 }
Ejemplo n.º 4
0
 private void LoadInterface()
 {
     frmInterface = new frmBooksMaster();
     frmInterface.IsLookUpMode = true;
 }