コード例 #1
0
 public dtoProfileAttributeType(ProfileAttributeType attribute, Boolean mandatory, UserTypeStandard userType) : this()
 {
     Attribute = attribute;
     Mandatory = mandatory;
     UserType  = userType;
     List <ProfileAttributeType> AlternativeAttributes = new List <ProfileAttributeType>();
 }
コード例 #2
0
 public dtoProfileAttributeType(ProfileAttributeType attribute, Boolean mandatory, UserTypeStandard userType, List <ProfileAttributeType> alternatives)
 {
     Attribute = attribute;
     Mandatory = mandatory;
     UserType  = userType;
     this.AlternativeAttributes = alternatives;
 }
コード例 #3
0
 public dtoProfileAttributeType(ProfileAttributeType attribute, UserTypeStandard userType)
 {
     Attribute = attribute;
     Mandatory = true;
     UserType  = userType;
     List <ProfileAttributeType> AlternativeAttributes = new List <ProfileAttributeType>();
 }
コード例 #4
0
        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());
        }
コード例 #5
0
        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());
        }
コード例 #6
0
        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);
        }
コード例 #7
0
        //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);
        }
コード例 #8
0
        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));
            }
        }
コード例 #9
0
        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);
            }
        }
コード例 #10
0
 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));
 }
コード例 #11
0
ファイル: ManageProfilePresenter.cs プロジェクト: ngocpq/MHX2
 public ProfileAttribute GetProfileAttributeByProfileIDAndType(Profile profile, ProfileAttributeType type)
 {
     return(_profileAttributeService.GetProfileAttributesByProfileIDAndTypeID(profile, type));
 }
コード例 #12
0
 public ProfileAttribute GetProfileAttributesByProfileIDAndTypeID(Profile profile, ProfileAttributeType type)
 {
     return(_profileAttributeRepository.GetProfileAttributesByProfileIDAndTypeID(profile.ProfileID, type.ProfileAttributeTypeID));
 }
コード例 #13
0
 public ProfileAttributeControl(Profile pro, ProfileAttributeType proAttrType, IProfileAttributeRepository repository)
 {
     _profile = pro;
     _ProfileAttributeType = proAttrType;
     _Repository           = repository;
 }
コード例 #14
0
 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());
 }