Пример #1
0
        /// <summary>
        /// 新增数据操作
        /// </summary>
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            FrmDepartmentEdit dlg = new FrmDepartmentEdit();

            dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved);
            dlg.InitFunction(LoginUserInfo, FunctionDict);//给子窗体赋值用户权限信息

            if (DialogResult.OK == dlg.ShowDialog())
            {
                LoadData();
            }
        }
Пример #2
0
        /// <summary>
        /// 编辑部门
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void depTree_DepartmentEdit(object sender, EventArgs e)
        {
            string        ID     = this.depTree.GetCurrentSelectId();
            List <string> IDList = this.depTree.GetIDList();

            if (!string.IsNullOrEmpty(ID))
            {
                FrmDepartmentEdit dlg = new FrmDepartmentEdit();
                dlg.ID           = ID;
                dlg.IDList       = IDList;
                dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved);
                dlg.InitFunction(LoginUserInfo, FunctionDict);//给子窗体赋值用户权限信息

                if (DialogResult.OK == dlg.ShowDialog())
                {
                    LoadData();
                }
            }
        }