private void PayReport() { if (CheckPayLogIn() == true) { HRDOCS.Pay_Report report = new Pay_Report(); if (!this.CheckOpened(report.Name)) { report.EmplId = ClassCurUser.LogInEmplId; report.EmplName = ClassCurUser.LogInEmplName; report.Key = ClassCurUser.LogInEmplKey; report.Section = ClassCurUser.LogInSection; report.StartPosition = FormStartPosition.CenterParent; report.WindowState = FormWindowState.Maximized; if ((report.Section == "01") || (report.EmplId == "M9999999")) { report.MdiParent = this; report.Show(); } else { MessageBox.Show("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้"); } } } else { // MessageBox.Show("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้"); return; } }
private void lbl_Report_Click(object sender, EventArgs e) { Pay_Report report = new Pay_Report(); report.Show(); }