public dtoProfileAttributeType(ProfileAttributeType attribute, Boolean mandatory, UserTypeStandard userType) : this() { Attribute = attribute; Mandatory = mandatory; UserType = userType; List <ProfileAttributeType> AlternativeAttributes = new List <ProfileAttributeType>(); }
public dtoProfileAttributeType(ProfileAttributeType attribute, Boolean mandatory, UserTypeStandard userType, List <ProfileAttributeType> alternatives) { Attribute = attribute; Mandatory = mandatory; UserType = userType; this.AlternativeAttributes = alternatives; }
public dtoProfileAttributeType(ProfileAttributeType attribute, UserTypeStandard userType) { Attribute = attribute; Mandatory = true; UserType = userType; List <ProfileAttributeType> AlternativeAttributes = new List <ProfileAttributeType>(); }
public List <ProfileAttributeCell> GetDuplicatedCells(ProfileAttributeType attribute) { List <ProfileAttributeCell> items = new List <ProfileAttributeCell>(); List <ProfileAttributeCell> values = GetColumnCells(attribute); var query = values.Where(ri => !String.IsNullOrEmpty(ri.Value)).GroupBy(ri => ri.Value, ri => ri).Where(ri => ri.Count() > 1); query.ToList().ForEach(r => items.AddRange(r)); return(items.Distinct().ToList()); }
private void LoadUserProfileAttribute(long idProvider, ProfileAttributeType aType, Boolean taxCodeRequired) { List <ProfileAttributeType> usedTypes = Service.GetUsedMacProfileAttribute(idProvider); usedTypes.Remove(aType); usedTypes.Remove(ProfileAttributeType.skip); List <lm.Comol.Core.BaseModules.ProfileManagement.dtoProfileAttributeType> items = ProfileService.GetAllProfileAttributes(taxCodeRequired); View.LoadAvailableProfileAttributes(items.Where(a => !usedTypes.Contains(a.Attribute)).ToList()); }
public virtual String GetAttributeValue(ProfileAttributeType att, List <dtoMacUrlUserAttribute> uAttributes) { String result = uAttributes.Where(a => a.Id == GetProfileAttributes().Where(p => p.Attribute == att).Select(p => p.Id).FirstOrDefault()).Select(a => a.QueryValue).FirstOrDefault(); if (String.IsNullOrEmpty(result) && GetCompositeAttributes().Any()) { result = uAttributes.Where(a => a.Id == GetCompositeAttributes().Where(p => p.Attribute == att).Select(p => p.Id).FirstOrDefault()).Select(a => a.QueryValue).FirstOrDefault(); } return(result); }
//private ProfileExternalTextRow CreateExternalRow(TextRow row, List<int> colIndexes, ref int index) //{ // ProfileExternalTextRow result = new ProfileExternalTextRow(); // result.Number = index; // result.AddRange(row.Select((value, i) => new { Value = value, Index = i }).Where(c => colIndexes.Contains(c.Index)).Select(c => c.Value).ToList()); // index += 1; // return result; //} public List <ProfileAttributeCell> GetColumnCells(ProfileAttributeType attribute) { List <ProfileAttributeCell> items = new List <ProfileAttributeCell>(); if (ColumHeader.Where(c => c.Attribute == attribute).Any()) { ProfileAttributeColumn col = ColumHeader.Where(c => c.Attribute == attribute).FirstOrDefault(); items = (from r in Rows select r.GetCell(col)).ToList(); // Rows.ForEach(r => items.AddRange(r.Select((value, i) => new { Value = value, Index = i }).Where(item => item.Index == index).Select(item => item.Value).ToList())); } return(items); }
public KeyValuePair <long, String> GetCalculatedCellLongValue(ProfileAttributeType attribute) { ProfileAttributeComputedCell cell = Cells.Where(c => c.GetType() == typeof(ProfileAttributeComputedCell) && c.Column.Attribute == attribute).Select(c => ( ProfileAttributeComputedCell)c).FirstOrDefault(); if (cell == null) { return(new KeyValuePair <long, String>()); } else { return(new KeyValuePair <long, String>(cell.InternallLongValue, cell.DisplayValue)); } }
public String GetCellValue(ProfileAttributeType attribute) { ProfileAttributeCell cell = Cells.Where(c => c.Column.Attribute == attribute).FirstOrDefault(); if (cell == null) { return(""); } else if (cell.Value.Contains(lm.Comol.Core.DomainModel.Helpers.ImportCostants.MultipleItemsSeparator)) { return(cell.Value.Replace(lm.Comol.Core.DomainModel.Helpers.ImportCostants.MultipleItemsSeparator, ", ")); } else { return(cell.Value); } }
public Dictionary <int, String> GetDuplicatedCellsValue(ProfileAttributeType attribute) { return(GetDuplicatedCells(attribute).Select((cell, i) => new { Value = cell.Value, RowIndex = i }).ToDictionary(item => item.RowIndex, item => item.Value)); }
public ProfileAttribute GetProfileAttributeByProfileIDAndType(Profile profile, ProfileAttributeType type) { return(_profileAttributeService.GetProfileAttributesByProfileIDAndTypeID(profile, type)); }
public ProfileAttribute GetProfileAttributesByProfileIDAndTypeID(Profile profile, ProfileAttributeType type) { return(_profileAttributeRepository.GetProfileAttributesByProfileIDAndTypeID(profile.ProfileID, type.ProfileAttributeTypeID)); }
public ProfileAttributeControl(Profile pro, ProfileAttributeType proAttrType, IProfileAttributeRepository repository) { _profile = pro; _ProfileAttributeType = proAttrType; _Repository = repository; }
public virtual String GetAttributeValue(ProfileAttributeType att, List <UserProfileAttribute> pAttributes, List <dtoMacUrlUserAttribute> uAttributes) { return(uAttributes.Where(a => a.Id == pAttributes.Where(p => p.Attribute == att).Select(p => p.Id).FirstOrDefault()).Select(a => a.QueryValue).FirstOrDefault()); }