Пример #1
0
        // <Head and Assistant Form>
        private void HeadApprove()
        {
            FormHdApprove HeadApprove = new FormHdApprove();
            //if (!ActivateForm(HeadApprove))
            if (!this.CheckOpened(HeadApprove.Name))
            {
                HeadApprove.EmplId = ClassCurUser.LogInEmplId;
                HeadApprove.EmplName = ClassCurUser.LogInEmplName;
                HeadApprove.Key = ClassCurUser.LogInEmplKey;
                HeadApprove.SysOutoffice = ClassCurUser.SysOutoffice;
                HeadApprove.StartPosition = FormStartPosition.CenterParent;
                HeadApprove.WindowState = FormWindowState.Maximized;

                if (HeadApprove.SysOutoffice == "1")
                {
                    HeadApprove.MdiParent = this;
                    HeadApprove.Show();
                }
                else
                {
                    MessageBox.Show("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้");
                }
            }
        }
Пример #2
0
        public void HeadApprove()
        {

            FormHdApprove HeadApprove = new FormHdApprove();
            HeadApprove.EmplId = ClassCurUser.LogInEmplId;
            HeadApprove.EmplName = ClassCurUser.LogInEmplName;
            HeadApprove.Key = ClassCurUser.LogInEmplKey;
            HeadApprove.SysOutoffice = ClassCurUser.SysOutoffice;
            HeadApprove.StartPosition = FormStartPosition.CenterParent;
            
            if (HeadApprove.SysOutoffice == "1")
            {
                HeadApprove.MdiParent = this;
                HeadApprove.Show();
            }
            else
            {
                MessageBox.Show("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้");
            }

        }