예제 #1
0
파일: FormMain.cs 프로젝트: SUPCDEV/HROS
        // <Report Form>
        private void ReportHrOutType()
        {
            FormReportHROut ReportHrOutType = new FormReportHROut();
            //if (!ActivateForm(ReportHrOutType))
            if (!this.CheckOpened(ReportHrOutType.Name))
            {
                ReportHrOutType.EmplId = ClassCurUser.LogInEmplId;
                ReportHrOutType.EmplName = ClassCurUser.LogInEmplName;
                ReportHrOutType.Key = ClassCurUser.LogInEmplKey;

                ReportHrOutType.SysOutoffice = ClassCurUser.SysOutoffice;
                ReportHrOutType.Section = ClassCurUser.LogInSection;
                ReportHrOutType.StartPosition = FormStartPosition.CenterParent;
                ReportHrOutType.WindowState = FormWindowState.Maximized;

                if ((ReportHrOutType.Section == "02" || ReportHrOutType.EmplId == "M9999999"))
                {
                    ReportHrOutType.MdiParent = this;
                    ReportHrOutType.Show();
                }
                else
                {
                    MessageBox.Show("สำหรับแผนกบุคคลเท่านั้น");
                }
            }
        }
예제 #2
0
파일: MDIParent1.cs 프로젝트: SUPCDEV/HROS
        public void ReportHrOutType()
        {
            FormReportHROut ReportHrOutType = new FormReportHROut();
            ReportHrOutType.EmplId = ClassCurUser.LogInEmplId;
            ReportHrOutType.EmplName = ClassCurUser.LogInEmplName;
            ReportHrOutType.Key = ClassCurUser.LogInEmplKey;

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


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