Beispiel #1
0
        public void AddUser()
        {
            UserManagementEntities entity       = (UserManagementEntities)CurrentModuleEntity;
            ADUsersInfo            objUsersInfo = new ADUsersInfo();
            guiManageUser          guiUser      = new guiManageUser(objUsersInfo);

            //guiUser.BringToFront();
            //guiUser.loca
            if (guiUser.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            objUsersInfo = guiUser.ADUsers;
            ADUsersController objUsersController = new ADUsersController();

            objUsersController.CreateObject(objUsersInfo);
            InvalidateUserList();
        }
Beispiel #2
0
        public void EditUser()
        {
            UserManagementEntities entity       = (UserManagementEntities)CurrentModuleEntity;
            ADUsersInfo            objUsersInfo = entity.ADUserList[entity.ADUserList.CurrentIndex];

            if (objUsersInfo == null)
            {
                return;
            }

            guiManageUser guiUser = new guiManageUser(objUsersInfo);

            if (guiUser.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            objUsersInfo = guiUser.ADUsers;
            ADUsersController objUsersController = new ADUsersController();

            objUsersController.UpdateObject(objUsersInfo);
            InvalidateUserList();
        }