Example #1
0
 private void HRCNStatusReport()
 {
     if (CheckLogIn() == true)
     {
         HRDOCS.Cancle_ReportStatusDoc HRCNStatusReport = new Cancle_ReportStatusDoc();
         if (!this.CheckOpened(HRCNStatusReport.Name))
         {
             HRCNStatusReport.StartPosition = FormStartPosition.CenterParent;
             HRCNStatusReport.WindowState = FormWindowState.Maximized;
             if (ClassCurUser.LogInSection == "02" || ClassCurUser.LogInEmplId == "M9999999")
             {
                 HRCNStatusReport.MdiParent = this;
                 HRCNStatusReport.Show();
             }
             else
             {
                 MessageBox.Show("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้");
             }
         }
     }
     else
     {
         MessageBox.Show("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้");
     }
 }
Example #2
0
        private void CN_DocStatust()
        {
            if (CheckLogIn() == true)
            {
                HRDOCS.Cancle_ReportStatusDoc ReportStat = new Cancle_ReportStatusDoc();

                if (!this.CheckOpened(ReportStat.Name))
                {
                    ReportStat.Section = ClassCurUser.LogInSection; //ทดสอบเฉพาะแผนก
                    ReportStat.EmplId = ClassCurUser.LogInEmplId;

                    ReportStat.StartPosition = FormStartPosition.CenterParent;
                    ReportStat.WindowState = FormWindowState.Maximized;
                    
                    ReportStat.MdiParent = this;
                    ReportStat.Show();

                    //if (ReportStat.Section == "02" || ReportStat.Section == "32" || ReportStat.Section == "321" || ReportStat.Section == "322" || ReportStat.Section == "28")
                    //{
                    //    ReportStat.MdiParent = this;
                    //    ReportStat.Show();
                    //}
                    //else
                    //{
                    //    MessageBox.Show("เมนูนี้อยู่ระหว่างทดลองใช้งานโดยสามารถใช้งานได้ในบางแผนกเท่านั้น");
                    //}
                }
                else
                {
                    // MessageBox.Show("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้");
                    return;
                }
            }
        }