Example #1
0
        private void PayCheck()
        {
            if (CheckPayLogIn() == true)
            {
                HRDOCS.Pay_CheckPay checkpay = new Pay_CheckPay();

                if (!this.CheckOpened(checkpay.Name))
                {
                    checkpay.EmplId = ClassCurUser.LogInEmplId;
                    checkpay.EmplName = ClassCurUser.LogInEmplName;
                    checkpay.Key = ClassCurUser.LogInEmplKey;
                    checkpay.Section = ClassCurUser.LogInSection;

                    checkpay.StartPosition = FormStartPosition.CenterParent;
                    checkpay.WindowState = FormWindowState.Maximized;

                    if ((checkpay.Section == "01") || (checkpay.EmplId == "M9999999"))
                    {
                        checkpay.MdiParent = this;
                        checkpay.Show();
                    }
                    else
                    {
                        MessageBox.Show("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้");
                    }
                }
            }
            else
            {
                // MessageBox.Show("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้");
                return;
            }
        }
Example #2
0
 private void lbl_workpermit_Click(object sender, EventArgs e)
 {
     Pay_CheckPay frm = new Pay_CheckPay();
     frm.Show();
 }