public DataSetETRoles LoadDMSRoles(string userName)
        {
            string ETRolesForuser ;

            DataSetETRoles ETRoles = new DataSetETRoles();
            DataSetETRoles.ETTableRow newRow ;

            //DataTable ETRolesForuser = new DataTable();
            //ETRolesForuser = _presenter.LoadDMSRoles(username, et_type, true);
            if (_ETHelper == null) _ETHelper = new IntegratedETHelper(userName, WorkItem);

            ETRolesForuser = _ETHelper.FindTrimUser(userName);
            if (!string.IsNullOrEmpty(ETRolesForuser))
            {
                newRow = ETRoles.ETTable.NewETTableRow();
                newRow.BeginEdit();
                newRow.RoleName = ETRolesForuser;
                newRow.Description = ETRolesForuser;
                newRow.UserName = userName;
                newRow.RoleType = ETRolesForuser;
                newRow.EndEdit();
                ETRoles.ETTable.AddETTableRow(newRow);
            }
            return ETRoles;
        }
        private void LoadWFGroups()
        {
            if (_ETHelper == null) _ETHelper = new IntegratedETHelper(_presenter.Key, WorkItem);
            _WFAssignRoles = new DataSetETRoles();
            _WFAssignedRoles = new DataSetETRoles();

            switch (_presenter.CurrentViewStatus)
            {
                case HiiP.Framework.Security.UserManagement.Interface.Constants.ViewStatus.Add:
                    try
                    {
                        // ultraOptionQueueType.Visible = this._ETHelper.IsCurrentUserSupervisoryMember(_presenter.Key.ToString());
                        this._WFAssignRoles = this._ETHelper.GetAllWFGroups();

                    }
                    catch (Exception ex) { ExceptionManager.HandleWithLogOnly(ex); }
                    break;
                case HiiP.Framework.Security.UserManagement.Interface.Constants.ViewStatus.Update:
                    this._WFAssignRoles = this._ETHelper.GetAllWFGroups();

                    try
                    {
                        // ultraOptionQueueType.Visible = this._ETHelper.IsCurrentUserSupervisoryMember(_presenter.Key.ToString());
                        this._WFAssignedRoles = this._ETHelper.GetWFRolesForUser(_presenter.Key);
                        this._WFAssignedRoles.Merge(this._ETHelper.GetParticipationForUser(_presenter.Key).ETTable);
                        this.ultraOptionUserType.CheckedIndex = _ETHelper.GetWFUser(_presenter.Key).RoleName.Equals(HiiP.Foundation.Workflow.Interface.Constants.IprocessServer.WorkflowRole.ADMIN) ? 1 : 0;
                    }
                    catch (Exception ex) { ExceptionManager.HandleWithLogOnly(ex); }
                    break;
                case HiiP.Framework.Security.UserManagement.Interface.Constants.ViewStatus.CopyNewUser:
                    this._WFAssignRoles = this._ETHelper.GetAllWFGroups();
                    try
                    {
                        // ultraOptionQueueType.Visible = this._ETHelper.IsCurrentUserSupervisoryMember(_presenter.Data.ToString());
                        this._WFAssignedRoles = this._ETHelper.GetWFRolesForUser(_presenter.Data.ToString());
                        this._WFAssignedRoles.Merge(this._ETHelper.GetParticipationForUser(_presenter.Data.ToString()).ETTable);
                        this.ultraOptionUserType.CheckedIndex = _ETHelper.GetWFUser(_presenter.Data.ToString()).RoleName.Equals(HiiP.Foundation.Workflow.Interface.Constants.IprocessServer.WorkflowRole.ADMIN) ? 1 : 0;
                    }
                    catch (Exception ex) { ExceptionManager.HandleWithLogOnly(ex); }
                    break;
            }

            this._ETHelper.BindGird(this.ultraGridWFAssigned, this._WFAssignedRoles);
            this._ETHelper.BindGird(this.ultraGridWFAllGroups, _WFAssignRoles);
            OldParticipations = this.GetParticipation();
        }
        private void LoadUserDMSRoles()
        {
            if (_ETHelper == null) _ETHelper = new IntegratedETHelper(_presenter.Key, WorkItem);
            _DMSAssignedRoles = new DataSetETRoles();
            _DMSAssignRoles = new DataSetETRoles();

            switch (_presenter.CurrentViewStatus)
            {
                case HiiP.Framework.Security.UserManagement.Interface.Constants.ViewStatus.Add:
                    this._DMSAssignRoles = _ETHelper.DMSRoles();
                    cb_dmsprofiles.DataSource = _DMSAssignRoles.ETTable;
                    cb_dmsprofiles.DataBind();
                    //this._DMSAssignRoles = this._ETHelper.RetrieveDMSRolesByUserName();
                    break;
                case HiiP.Framework.Security.UserManagement.Interface.Constants.ViewStatus.Update:
                    this._DMSAssignedRoles = this.LoadDMSRoles(_presenter.Key);
                    this._DMSAssignRoles = _ETHelper.DMSRoles();
                    cb_dmsprofiles.DataSource = _DMSAssignRoles.ETTable;
                    cb_dmsprofiles.DataBind();
                    cb_dmsprofiles.Value = _DMSAssignedRoles.ETTable.Rows.Count > 0 ? _DMSAssignedRoles.ETTable.Rows[0][_DMSAssignedRoles.ETTable.RoleNameColumn.ColumnName].ToString() : "";
                    this.SetDirtyStatus(false);
                    break;
                case HiiP.Framework.Security.UserManagement.Interface.Constants.ViewStatus.CopyNewUser:
                    this._DMSAssignRoles = _ETHelper.DMSRoles();
                    this._DMSAssignedRoles = this.LoadDMSRoles(_presenter.Data.ToString());
                    cb_dmsprofiles.DataSource = _DMSAssignRoles.ETTable;
                    cb_dmsprofiles.DataBind();
                    cb_dmsprofiles.Value = _DMSAssignedRoles.ETTable.Rows.Count >0? _DMSAssignedRoles.ETTable.Rows[0][_DMSAssignedRoles.ETTable.RoleNameColumn.ColumnName].ToString():"";
                    break;
            }

            //this._ETHelper.BindGird(this.ultraGridDMSAssigned, this._DMSAssignedRoles);
            //this._ETHelper.BindGird(this.ultraGridDMSAllRoles, _DMSAssignRoles);
        }
        private void LoadGISRoles()
        {
            if (_ETHelper == null) _ETHelper = new IntegratedETHelper(_presenter.Key, WorkItem);
            _GISAssignRoles = new DataSetETRoles();
            _GISAssignedRoles = new DataSetETRoles();

            switch (_presenter.CurrentViewStatus)
            {
                case HiiP.Framework.Security.UserManagement.Interface.Constants.ViewStatus.Add:
                    this._ETHelper.BindGird(this.ultraGridGISAssignedRoles, this._GISAssignedRoles);
                    this._ETHelper.BindGird(this.ultraGridGISAllRoles, _GISAssignRoles);
                    Search();
                    break;
                case HiiP.Framework.Security.UserManagement.Interface.Constants.ViewStatus.Update:
                    SelectedUser = _presenter.Key;
                    _GISAssignedRoles = _ETHelper.GetUsersGISRoles(_presenter.Key);
                    GISRolesAssigned = AssignedGISRoles();
                    this._ETHelper.BindGird(this.ultraGridGISAssignedRoles, this._GISAssignedRoles);
                    this._ETHelper.BindGird(this.ultraGridGISAllRoles, _GISAssignRoles);
                    Search();
                    break;
                case HiiP.Framework.Security.UserManagement.Interface.Constants.ViewStatus.CopyNewUser:

                    _GISAssignedRoles = _ETHelper.GetUsersGISRoles(_presenter.Data.ToString());
                    GISRolesAssigned = AssignedGISRoles();
                    this._ETHelper.BindGird(this.ultraGridGISAssignedRoles, this._GISAssignedRoles);
                    this._ETHelper.BindGird(this.ultraGridGISAllRoles, _GISAssignRoles);
                    this.Search();
                    break;
            }
        }