// <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("สำหรับแผนกบุคคลเท่านั้น"); } } }
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("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้"); } }