Exemplo n.º 1
0
        // <Hr Form>
        private void HrApproveOut()
        {
            FormHrApproveOut HrApproveOut = new FormHrApproveOut();
            //if (!ActivateForm(HrApproveOut))
            if (!this.CheckOpened(HrApproveOut.Name))
            {
                HrApproveOut.EmplId = ClassCurUser.LogInEmplId;
                HrApproveOut.EmplName = ClassCurUser.LogInEmplName;
                HrApproveOut.Key = ClassCurUser.LogInEmplKey;

                HrApproveOut.SysOutoffice = ClassCurUser.SysOutoffice;
                HrApproveOut.Section = ClassCurUser.LogInSection;
                HrApproveOut.HrApproveOut = ClassCurUser.SysHrApproveOut;

                HrApproveOut.StartPosition = FormStartPosition.CenterParent;
                HrApproveOut.WindowState = FormWindowState.Maximized;
                //if (HrApproveOut.Section == "02" || HrApproveOut.EmplId == "M9999999")
                //{
                if (HrApproveOut.HrApproveOut == "1")
                {
                    HrApproveOut.MdiParent = this;
                    HrApproveOut.Show();
                }
                else
                {
                    MessageBox.Show("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้");
                }
                //}
                //else
                //{
                //    MessageBox.Show("สำหรับแผนกบุคคลเท่านั้น");
                //}
            }
        }
Exemplo n.º 2
0
        public void HrApproveOut()
        {
            FormHrApproveOut HrApproveOut = new FormHrApproveOut();
            HrApproveOut.EmplId = ClassCurUser.LogInEmplId;
            HrApproveOut.EmplName = ClassCurUser.LogInEmplName;
            HrApproveOut.Key = ClassCurUser.LogInEmplKey;

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

            if (HrApproveOut.Section == "02" && HrApproveOut.SysOutoffice == "2" || HrApproveOut.SysOutoffice == "1")
            {
                HrApproveOut.MdiParent = this;
                HrApproveOut.Show();
            }
            else
            {

                MessageBox.Show("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้");
            }
        }