示例#1
0
        public frmDepartmentEdit(frmDepartmentList _frmDepartmentList, SysUser _User, string _PrimaryKey, int _OperationType)
        {
            InitializeComponent();

            PrimaryKey    = _PrimaryKey;
            OperationType = _OperationType;
            User          = _User;
            frmParent     = _frmDepartmentList;

            if (OperationType == 3)
            {
                getDetail();

                this.btnSave.Visible = false;
            }

            if (OperationType == 2)
            {
                getDetail();

                this.D_UpdateBy.Text = User.F_Account;
                this.D_Code.ReadOnly = true;
            }

            if (OperationType == 1)
            {
                D_CreateBy.Text = User.F_Account;
            }

            loadDroplistData();
        }
示例#2
0
        private void cmsDepartment_Click(object sender, EventArgs e)
        {
            frmDepartmentList frmDepartment = new frmDepartmentList(this);

            frmDepartment.WindowState = FormWindowState.Maximized;

            foreach (DockContent frm in this.panMain.Contents)
            {
                if (frm.Name == frmDepartment.Name)
                {
                    frm.Activate();//激活
                    return;
                }
            }

            frmDepartment.Show(this.panMain);
        }