Exemplo n.º 1
0
        private void btnEditUser_Click(object sender, EventArgs e)
        {
            FrmSelectUser dlg = new FrmSelectUser();

            dlg.SelectUserDict = this.SelectUserDict;
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                GetUserDictChangs(this.SelectUserDict, dlg.SelectUserDict);

                foreach (int id in deletedUserList)
                {
                    BLLFactory <BlackIP> .Instance.RemoveUser(id, tempInfo.Id);
                }
                foreach (int id in addedUserList)
                {
                    BLLFactory <BlackIP> .Instance.AddUser(id, tempInfo.Id);
                }

                this.RefreshUsers();
            }
            else
            {
                MessageDxUtil.ShowTips("请选择具体的机构");
            }
        }
Exemplo n.º 2
0
        private void btnEditUser_Click(object sender, EventArgs e)
        {
            if (this.treeView1.SelectedNode != null)
            {
                FrmSelectUser dlg = new FrmSelectUser();
                dlg.SelectUserDict = this.SelectUserDict;
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    GetUserDictChanges(this.SelectUserDict, dlg.SelectUserDict);

                    foreach (int id in deletedUserList)
                    {
                        BLLFactory <Role> .Instance.RemoveUser(id, currentID.ToInt32());
                    }
                    foreach (int id in addedUserList)
                    {
                        BLLFactory <Role> .Instance.AddUser(id, currentID.ToInt32());
                    }

                    this.RefreshUsers(currentID.ToInt32());
                }
            }
            else
            {
                MessageDxUtil.ShowTips("请选择具体的角色");
            }
        }