Example #1
0
        public User(string passwordHash, UserContactDto userContactDto, UserDataDto userDataDto, UserPaymentDto userPaymentDto,
                    UserNotificationOptionsDto userNotificationOptions,
                    UserPermissionDto userPermissionDto, IList <Document> documents, EntityCreatedDto entityCreatedDto)
        {
            // TODO: Muss hier ein Passwort angegeben werden oder nicht?
            // Require.NotNullOrWhiteSpace(passwordHash, "passwordHash");
            Require.NotNull(userContactDto, "userContactDto");
            Require.NotNull(userDataDto, "userDataDto");
            Require.NotNull(userPermissionDto, "userPermissionDto");
            Require.NotNull(entityCreatedDto, "entityCreatedDto");
            Require.NotNull(userPaymentDto, "userPaymentDto");
            Require.NotNull(documents, "documents");
            Require.NotNull(userNotificationOptions, "userNotificationOptions");


            _passwordHash = passwordHash;

            Update(userContactDto);
            Update(userDataDto);
            Update(userPermissionDto);
            Update(entityCreatedDto);
            Update(userPaymentDto);
            Update(userNotificationOptions);
            Update(documents);
        }
Example #2
0
 protected bool Equals(UserNotificationOptionsDto other)
 {
     return(NotifyMeAsCreditorOnPeanutDeleted == other.NotifyMeAsCreditorOnPeanutDeleted &&
            NotifyMeAsCreditorOnPeanutRequirementsChanged == other.NotifyMeAsCreditorOnPeanutRequirementsChanged &&
            NotifyMeAsParticipatorOnPeanutChanged == other.NotifyMeAsParticipatorOnPeanutChanged &&
            NotifyMeOnPeanutInvitation == other.NotifyMeOnPeanutInvitation && NotifyMeAsCreditorOnDeclinedBills == other.NotifyMeAsCreditorOnDeclinedBills &&
            NotifyMeAsDebitorOnIncomingBills == other.NotifyMeAsDebitorOnIncomingBills && NotifyMeOnIncomingPayment == other.NotifyMeOnIncomingPayment &&
            NotifyMeAsCreditorOnSettleableBills == other.NotifyMeAsCreditorOnSettleableBills &&
            SendMeWeeklySummaryAndForecast == other.SendMeWeeklySummaryAndForecast);
 }
Example #3
0
 private void Update(UserNotificationOptionsDto dto)
 {
     _notifyMeAsCreditorOnPeanutDeleted             = dto.NotifyMeAsCreditorOnPeanutDeleted;
     _notifyMeAsCreditorOnPeanutRequirementsChanged = dto.NotifyMeAsCreditorOnPeanutRequirementsChanged;
     _notifyMeAsParticipatorOnPeanutChanged         = dto.NotifyMeAsParticipatorOnPeanutChanged;
     _notifyMeAsCreditorOnDeclinedBills             = dto.NotifyMeAsCreditorOnDeclinedBills;
     _notifyMeAsDebitorOnIncomingBills    = dto.NotifyMeAsDebitorOnIncomingBills;
     _notifyMeOnIncomingPayment           = dto.NotifyMeOnIncomingPayment;
     _notifyMeAsCreditorOnSettleableBills = dto.NotifyMeAsCreditorOnSettleableBills;
     _notifyMeOnPeanutInvitation          = dto.NotifyMeOnPeanutInvitation;
     _sendMeWeeklySummaryAndForecast      = dto.SendMeWeeklySummaryAndForecast;
 }
Example #4
0
        /// <summary>
        ///     Aktualisiert die Profildaten des Nutzers und markiert ihn als geändert.
        /// </summary>
        /// <param name="userContactDto"></param>
        /// <param name="userDataDto"></param>
        /// <param name="userPaymentDto"></param>
        /// <param name="userNotificationOptionsDto"></param>
        /// <param name="entityChangedDto"></param>
        public virtual void Update(UserContactDto userContactDto, UserDataDto userDataDto, UserPaymentDto userPaymentDto,
                                   UserNotificationOptionsDto userNotificationOptionsDto, EntityChangedDto entityChangedDto)
        {
            Require.NotNull(userContactDto, "userContactDto");
            Require.NotNull(userDataDto, "userDataDto");
            Require.NotNull(entityChangedDto, "entityChangedDto");
            Require.NotNull(userPaymentDto, "userPaymentDto");
            Require.NotNull(userNotificationOptionsDto, "userNotificationOptionsDto");

            Update(userContactDto);
            Update(userDataDto);
            Update(userPaymentDto);
            Update(userNotificationOptionsDto);
            Update(entityChangedDto);
        }
Example #5
0
        /// <summary>
        ///     Aktualisiert alle Eigenschaften des Nutzer und markiert ihn als geändert.
        /// </summary>
        /// <param name="passwordHash"></param>
        /// <param name="userContactDto"></param>
        /// <param name="userDataDto"></param>
        /// <param name="userPaymentDto"></param>
        /// <param name="userNotificationOptionsDto"></param>
        /// <param name="userPermissionDto"></param>
        /// <param name="documents">
        ///     Liste mit Dokumenten, die am Nutzer hinterlegt sein soll. Die Liste enthält sowohl neue, als
        ///     auch weiterhin hinterlegte Dokumente
        /// </param>
        /// <param name="entityChangedDto"></param>
        public virtual void Update(string passwordHash, UserContactDto userContactDto, UserDataDto userDataDto,
                                   UserPaymentDto userPaymentDto, UserNotificationOptionsDto userNotificationOptionsDto, UserPermissionDto userPermissionDto,
                                   IList <Document> documents, EntityChangedDto entityChangedDto)
        {
            Require.NotNullOrWhiteSpace(passwordHash, "passwordHash");
            Require.NotNull(userContactDto, "userContactDto");
            Require.NotNull(userDataDto, "userDataDto");
            Require.NotNull(userPermissionDto, "userPermissionDto");
            Require.NotNull(entityChangedDto, "entityChangedDto");
            Require.NotNull(documents, "documents");
            Require.NotNull(userPaymentDto, "userPaymentDto");
            Require.NotNull(userNotificationOptionsDto, "userNotificationOptionsDto");


            _passwordHash = passwordHash;

            Update(userContactDto);
            Update(userDataDto);
            Update(userPermissionDto);
            Update(documents);
            Update(userPaymentDto);
            Update(userNotificationOptionsDto);
            Update(entityChangedDto);
        }