Example #1
0
        protected override void ExecItemEdit()
        {
            base.ExecItemEdit();
            string GUID = "";

            if (button2.Checked)
            {
                if (!db.CheckOprtRole("KQEmpShift", "M", CheckForward))
                {
                    return;
                }
                GUID = Report.FieldByName("GUID").AsString;
                frmKQShiftAssertEmp frm = new frmKQShiftAssertEmp(this.Text, CurrentTool, GUID);
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    ExecItemRefresh();
                }
            }
            else if (button4.Checked)
            {
                if (!db.CheckOprtRole("KQDepShift", "M", CheckForward))
                {
                    return;
                }
                GUID = Report.FieldByName("GUID").AsString;
                frmKQShiftAssertDep frm = new frmKQShiftAssertDep(this.Text, CurrentTool, GUID);
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    ExecItemRefresh();
                }
            }
            else if (button6.Checked)
            {
                if (!db.CheckOprtRole("KQEmpWorkType", "M", CheckForward))
                {
                    return;
                }
                GUID = Report.FieldByName("GUID").AsString;
                frmKQEmpWorkTypeAdd frm = new frmKQEmpWorkTypeAdd(this.Text, CurrentTool, GUID);
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    ExecItemRefresh();
                }
            }
            else if (button8.Checked)
            {
                if (!db.CheckOprtRole("KQDepWorkType", "M", CheckForward))
                {
                    return;
                }
                GUID = Report.FieldByName("GUID").AsString;
                frmKQDepWorkTypeAdd frm = new frmKQDepWorkTypeAdd(this.Text, CurrentTool, GUID);
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    ExecItemRefresh();
                }
            }
        }
Example #2
0
        protected override void ExecItemAdd()
        {
            base.ExecItemAdd();
            frmKQDepWorkTypeAdd frm = new frmKQDepWorkTypeAdd(this.Text, CurrentTool, "");

            if (frm.ShowDialog() == DialogResult.OK)
            {
                ExecItemRefresh();
            }
        }
Example #3
0
        protected override void ExecItemEdit()
        {
            base.ExecItemEdit();
            DataRowView         drv  = (DataRowView)bindingSource.Current;
            string              GUID = drv.Row["GUID"].ToString();
            frmKQDepWorkTypeAdd frm  = new frmKQDepWorkTypeAdd(this.Text, CurrentTool, GUID);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                ExecItemRefresh();
            }
        }