public DataSetETRoles GetWFUserQueues() { DataRow drRemove; ETRoles = new DataSetETRoles(); using (UserMaintenanceServiceProxy proxy = new UserMaintenanceServiceProxy()) { ETRoles = proxy.RetrieveAllWFUsers(); } ETRoles.ETTable.PrimaryKey = new DataColumn[] { ETRoles.ETTable.RoleNameColumn }; drRemove = ETRoles.ETTable.Rows.Find(this.UserName); if (drRemove != null) ETRoles.ETTable.Rows.Remove(drRemove); return ETRoles; }
internal UserEntity GetWFUser(string username) { using (UserMaintenanceServiceProxy proxy = new UserMaintenanceServiceProxy()) { return proxy.GetWFUser(username); } }
public DataSetETRoles GetWFRolesForUser(string userName) { DataSetETRoles WFGroups = new DataSetETRoles(); DataSetETRoles.ETTableRow WFRow = WFGroups.ETTable.NewETTableRow(); this.UserName = userName; try { try { using (UserMaintenanceServiceProxy proxy = new UserMaintenanceServiceProxy()) { GroupQueueDataSet.WF_GroupQueueDataTable GQDS = new GroupQueueDataSet.WF_GroupQueueDataTable(); GQDS = proxy.RetrieveGroupsByUser(userName).WF_GroupQueue; for (int i = 0; i < GQDS.Rows.Count; i++) { WFRow = WFGroups.ETTable.NewETTableRow(); WFRow.BeginEdit(); WFRow[WFGroups.ETTable.RoleNameColumn.ColumnName] = GQDS.Rows[i][GQDS.GroupNameColumn.ColumnName].ToString(); WFRow[WFGroups.ETTable.DescriptionColumn.ColumnName] = GQDS.Rows[i][GQDS.GroupDescColumn.ColumnName].ToString(); WFRow[WFGroups.ETTable.UserNameColumn.ColumnName] = userName; WFRow[WFGroups.ETTable.RoleTypeColumn.ColumnName] = "G";//--- To Dertermine that this is a user WFRow[WFGroups.ETTable.IsSupervisorColumn.ColumnName] = IsGroupSupervisor(GQDS.Rows[i][GQDS.QueueSupervisorNameColumn.ColumnName].ToString()); WFRow.EndEdit(); WFGroups.ETTable.AddETTableRow(WFRow); } } } catch (Exception ex) { ExceptionManager.HandleWithLogOnly(ex); } return WFGroups; } finally { WFGroups = null; } }
public DataSetETRoles GetUsersGISRoles(string UserName) { DataSetETRoles _ETRoles = new DataSetETRoles(); DataSetETRoles.ETTableRow GISRow = _ETRoles.ETTable.NewETTableRow(); List<ETRoleEntity> GISRoles; using (UserMaintenanceServiceProxy proxy = new UserMaintenanceServiceProxy()) { GISRoles = new List<ETRoleEntity>(); GISRoles = proxy.GetGISRolesForUser(UserName); for (int i = 0; i < GISRoles.Count; i++) { GISRow = _ETRoles.ETTable.NewETTableRow(); GISRow.BeginEdit(); // GISRow[_ETRoles.ETTable.RoleIDColumn.ColumnName] = GISRoles[i].RoleName; GISRow[_ETRoles.ETTable.RoleNameColumn.ColumnName] = GISRoles[i].RoleName; GISRow[_ETRoles.ETTable.DescriptionColumn.ColumnName] = GISRoles[i].RoleName; GISRow[_ETRoles.ETTable.UserNameColumn.ColumnName] = GISRoles[i].UserId; GISRow[_ETRoles.ETTable.RoleTypeColumn.ColumnName] = Framework.Security.UserManagement.Interface.Constants.EnablingTechnologies.GIS.ToString(); GISRow.EndEdit(); _ETRoles.ETTable.AddETTableRow(GISRow); } } return _ETRoles; }
public DataSetETRoles GetParticipationForUser(string userName) { DataSetETRoles WFGroups = new DataSetETRoles(); DataSetETRoles.ETTableRow WFRow = WFGroups.ETTable.NewETTableRow(); try { List<UserEntity> Participents = new List<UserEntity>(); using (UserMaintenanceServiceProxy proxy = new UserMaintenanceServiceProxy()) { Participents = proxy.GetParticipation(userName); for (int i = 0; i < Participents.Count; i++) { WFRow = WFGroups.ETTable.NewETTableRow(); WFRow.BeginEdit(); WFRow[WFGroups.ETTable.RoleNameColumn.ColumnName] = Participents[i].UserName.ToString(); WFRow[WFGroups.ETTable.DescriptionColumn.ColumnName] = Participents[i].Description.ToString(); WFRow[WFGroups.ETTable.UserNameColumn.ColumnName] = userName; WFRow[WFGroups.ETTable.RoleTypeColumn.ColumnName] = "U";//--- To Dertermine that this is a user WFRow[WFGroups.ETTable.IsSupervisorColumn.ColumnName] = IsGroupSupervisor(Participents[i].SupervisorID); WFRow.EndEdit(); WFGroups.ETTable.AddETTableRow(WFRow); } } } catch (Exception ex) { ExceptionManager.HandleWithLogOnly(ex); } return WFGroups; }
public DataSetETRoles GetAllWFGroups() { ETRoles = new DataSetETRoles(); using (UserMaintenanceServiceProxy proxy = new UserMaintenanceServiceProxy()) { ETRoles = proxy.RetrieveAllWFGroups(); } return ETRoles; }
public DataSetETRoles GetAllGISRoles() { ETRoles = new DataSetETRoles(); DataSetETRoles.ETTableRow GISRow = ETRoles.ETTable.NewETTableRow(); string[]GISRoles; using (UserMaintenanceServiceProxy proxy = new UserMaintenanceServiceProxy()) { GISRoles = proxy.GetAllGISRoles(); for (int i = 0; i < GISRoles.Length; i++) { GISRow = ETRoles.ETTable.NewETTableRow(); GISRow.BeginEdit(); // GISRow[ETRoles.ETTable.RoleIDColumn.ColumnName] = GISRoles[i].ToString(); GISRow[ETRoles.ETTable.RoleNameColumn.ColumnName] = GISRoles[i].ToString(); GISRow[ETRoles.ETTable.DescriptionColumn.ColumnName] = GISRoles[i].ToString(); GISRow[ETRoles.ETTable.UserNameColumn.ColumnName] = _userName; GISRow[ETRoles.ETTable.RoleTypeColumn.ColumnName] = Framework.Security.UserManagement.Interface.Constants.EnablingTechnologies.GIS.ToString(); GISRow.EndEdit(); ETRoles.ETTable.AddETTableRow(GISRow); } } return ETRoles; }