Exemple #1
0
        // <Shift>
        #region Shift

        private void Shift_CreateNewDoc()
        {

            //SPC_WS_OIBUSER frmSPC_WS_OIBUSER = new SPC_WS_OIBUSER();
            //if (!this.CheckOpened(frmSPC_WS_OIBUSER.Name))
            //{
            //    frmSPC_WS_OIBUSER.MdiParent = this;
            //    frmSPC_WS_OIBUSER.Show();
            //    frmSPC_WS_OIBUSER.Activate();
            //}


            //if (ClassCurUser.LogInSection == "32" || ClassCurUser.LogInSection == "322")
            //{
            //if (CheckShiftLogIn() == true)
            if (CheckLogIn() == true)
            {
                HRDOCS.Shift_Create shiftcreate = new Shift_Create();
                if (!this.CheckOpened(shiftcreate.Name))
                {
                    shiftcreate.EmplId = ClassCurUser.LogInEmplId;
                    shiftcreate.EmplName = ClassCurUser.LogInEmplName;
                    shiftcreate.Key = ClassCurUser.LogInEmplKey;


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


                //if (!ActivateForm(shiftcreate))
                //{
                //    shiftcreate.EmplId = ClassCurUser.LogInEmplId;
                //    shiftcreate.EmplName = ClassCurUser.LogInEmplName;
                //    shiftcreate.Key = ClassCurUser.LogInEmplKey;


                //    shiftcreate.StartPosition = FormStartPosition.CenterParent;
                //    shiftcreate.WindowState = FormWindowState.Maximized;
                //    shiftcreate.MdiParent = this;
                //    shiftcreate.Show();
                //}
            }
            //}
            else
            {
                MessageBox.Show("คุณไม่มีสิทธิเข้าถึงหน้านี้ได้");
            }
        }
Exemple #2
0
        void Btn_ShiftCreate_Click(object sender, EventArgs e)
        {
            using (Shift_Create frm = new Shift_Create())
            {
                frm.Text = "สร้างเอกสารใบเปลี่ยนกะ";

                if (ClassForm.ShowDialog(frm) == DialogResult.Yes)
                {
                   
                }
            }
        }