private void Shift_EditNewDoc() { //if (ClassCurUser.LogInSection == "32" || ClassCurUser.LogInSection == "322") //{ //if (CheckShiftLogIn() == true) if (CheckLogIn() == true) { HRDOCS.Shift_Edit shiftedit = new Shift_Edit(); if (!this.CheckOpened(shiftedit.Name)) { shiftedit.EmplId = ClassCurUser.LogInEmplId; shiftedit.EmplName = ClassCurUser.LogInEmplName; shiftedit.Key = ClassCurUser.LogInEmplKey; shiftedit.StartPosition = FormStartPosition.CenterParent; shiftedit.WindowState = FormWindowState.Maximized; shiftedit.MdiParent = this; shiftedit.Show(); } //HRDOCS.Shift_Edit shiftedit = new Shift_Edit(); //if (!ActivateForm(shiftedit)) //{ // shiftedit.EmplId = ClassCurUser.LogInEmplId; // shiftedit.EmplName = ClassCurUser.LogInEmplName; // shiftedit.Key = ClassCurUser.LogInEmplKey; // shiftedit.StartPosition = FormStartPosition.CenterParent; // shiftedit.WindowState = FormWindowState.Maximized; // shiftedit.MdiParent = this; // shiftedit.Show(); //} } //} else { MessageBox.Show("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้"); } }
void Btn_ShiftEdit_Click(object sender, EventArgs e) { using (Shift_Edit frm = new Shift_Edit()) { frm.Text = "แก้ไขข้อมูล"; if (ClassForm.ShowDialog(frm) == DialogResult.Yes) { } } }