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); }
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); }