Example #1
0
        private void HrApproveIn()
        {
            FormHrApprovedIn HrApproveIn = new FormHrApprovedIn();
            //if (!ActivateForm(HrApproveIn))
            if (!this.CheckOpened(HrApproveIn.Name))
            {
                HrApproveIn.EmplId = ClassCurUser.LogInEmplId;
                HrApproveIn.EmplName = ClassCurUser.LogInEmplName;
                HrApproveIn.Key = ClassCurUser.LogInEmplKey;

                HrApproveIn.SysOutoffice = ClassCurUser.SysOutoffice;
                HrApproveIn.Section = ClassCurUser.LogInSection;
                HrApproveIn.HrApproveIn = ClassCurUser.SysHrApproveIn;

                HrApproveIn.StartPosition = FormStartPosition.CenterParent;
                HrApproveIn.WindowState = FormWindowState.Maximized;
                //if (HrApproveIn.Section == "02" || HrApproveIn.EmplId == "M9999999")
                //{
                if (HrApproveIn.HrApproveIn == "1")
                {
                    HrApproveIn.MdiParent = this;
                    HrApproveIn.Show();
                }
                else
                {
                    MessageBox.Show("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้");
                }

            }
        }
Example #2
0
        public void HrApproveIn()
        {
            FormHrApprovedIn HrApproveIn = new FormHrApprovedIn();
            HrApproveIn.EmplId = ClassCurUser.LogInEmplId;
            HrApproveIn.EmplName = ClassCurUser.LogInEmplName;
            HrApproveIn.Key = ClassCurUser.LogInEmplKey;

            HrApproveIn.SysOutoffice = ClassCurUser.SysOutoffice;
            HrApproveIn.Section = ClassCurUser.LogInSection;
            HrApproveIn.StartPosition = FormStartPosition.CenterParent;

            if (HrApproveIn.Section == "02" && HrApproveIn.SysOutoffice == "2" || HrApproveIn.SysOutoffice == "1")
            {
                HrApproveIn.MdiParent = this;
                HrApproveIn.Show();
            }
            else
            {
                MessageBox.Show("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้");
            }  
        }