Ejemplo n.º 1
0
        public bool UserNeedCompleteInfo(User user)
        {
            if (Version != string.Empty && user.ExtendedFieldVersion != null && Version != user.ExtendedFieldVersion)
            {
                ExtendedField[] fields = FieldsWithPassport.ToArray();

                foreach (ExtendedField field in fields)
                {
                    if (field.IsRequired)
                    {
                        UserExtendedValue extendedValue = user.ExtendedFields.GetValue(field.Key);
                        if (extendedValue == null || string.IsNullOrEmpty(extendedValue.Value))
                        {
                            return(true);
                        }
                    }
                }

                UserBO.Instance.UpdateExtendedFieldVersion(user.UserID, Version);

                return(false);
            }

            return(false);
        }
Ejemplo n.º 2
0
        public List <string> GetNeedCompleteInfoNames(User user)
        {
            List <string> result = new List <string>();

            if (Version != string.Empty && user.ExtendedFieldVersion != null && Version != user.ExtendedFieldVersion)
            {
                ExtendedField[] fields = FieldsWithPassport.ToArray();

                foreach (ExtendedField field in fields)
                {
                    if (field.IsRequired)
                    {
                        UserExtendedValue extendedValue = user.ExtendedFields.GetValue(field.Key);
                        if (extendedValue == null || string.IsNullOrEmpty(extendedValue.Value))
                        {
                            result.Add(field.Name);
                        }
                    }
                }
            }

            return(result);
        }