// The main data entry form for the program.
        /*** Nearing completion ***/
        private void ShowWorkOrderForm()
        {
            frmProductionSchedule objfrmProductionSchedule = frmProductionSchedule.GetChildInstance(ActiveSession);

            objfrmProductionSchedule.MdiParent = this;

            objfrmProductionSchedule.Show();
            objfrmProductionSchedule.BringToFront();
        }
        // Exiting the form.
        private void tsbClose_Click(object sender, EventArgs e)
        {
            if (!ProcessLeavingWorkOrder(ActiveState))
            {
                return;
            }

            if (frmProductionScheduleChild != null)
            {
                frmProductionScheduleChild = null;
            }
            this.Close();
        }