Exemplo n.º 1
0
        public void UpdateUser(string oldUsername, MOG_User user, string privileges)
        {
            ListViewItem item = FindUser(oldUsername);

            if (item != null)
            {
                if (mProject != null)
                {
                    if (mProject.UserUpdate(oldUsername, user.GetUserName(), user.GetUserEmailAddress(), user.GetBlessTarget(), user.GetUserDepartment()))
                    {
                        mPrivileges.SetUserGroup(user.GetUserName(), privileges);

                        //update the listview item with the new information
                        item.Text             = user.GetUserName();
                        item.SubItems[1].Text = user.GetUserDepartment();
                        item.SubItems[2].Text = user.GetUserEmailAddress();
                        item.SubItems[3].Text = mPrivileges.GetUserGroup(user.GetUserName());
                        item.SubItems[4].Text = user.GetBlessTarget();
                    }
                }
            }
        }