Exemple #1
0
        private void 以其他用户登录ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            forms.frm_login frm = new forms.frm_login();
            frm.ShowDialog();
            if (frm.dept_code == -1)
            {
                this.Close();
            }
            else
            {
                _username = frm.username;
                _deptname = frm.dept_name;
                _deptcode = frm.dept_code;

                this.Text = "重装板块成本系统       " + "部门:" + _deptname + "   " + _username;
            }
        }
Exemple #2
0
        private void 总控窗口_Load(object sender, EventArgs e)
        {
            if (_username == "")
            {
                forms.frm_login frm = new forms.frm_login();
                frm.ShowDialog();
                if (frm.dept_code == -1)
                {
                    this.Close();
                }
                else
                {
                    _username = frm.username;
                    _deptname = frm.dept_name;
                    _deptcode = frm.dept_code;
                    _usercard = frm.usercard;

                    this.Text = "重装板块成本系统(ver 1.5)       " + "部门:" + _deptname + "   " + _username;
                }

                if (_deptcode != 1)
                {
                    管理ToolStripMenuItem.Enabled = false;
                    工具ToolStripMenuItem.Enabled = true;
                }
                else
                {
                    工具ToolStripMenuItem.Enabled = false;
                }

                导入工号台时ToolStripMenuItem.Enabled = false;
                导入每月台时ToolStripMenuItem.Enabled = false;

                if (_deptcode == 33)
                {
                    导入每月台时ToolStripMenuItem.Enabled = true;
                }
                if (_deptcode == 21)
                {
                    导入工号台时ToolStripMenuItem.Enabled = true;
                }
            }
        }