Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Staff"/> class.
        /// </summary>
        /// <param name="agency">
        /// The agency.
        /// </param>
        /// <param name="staffProfile">
        /// The staff profile.
        /// </param>
        protected internal Staff(Agency agency, StaffProfile staffProfile)
            : this()
        {
            Check.IsNotNull(agency, () => Agency);
            Check.IsNotNull(staffProfile, () => StaffProfile);

            _agency       = agency;
            _staffProfile = staffProfile;
        }
Example #2
0
        /// <summary>
        /// Creates the staff.
        /// </summary>
        /// <param name="agency">The agency.</param>
        /// <param name="staffProfile">The staff profile.</param>
        /// <returns>
        /// A Staff
        /// </returns>
        public Staff CreateStaff(Agency agency, StaffProfile staffProfile)
        {
            var staff = new Staff(agency, staffProfile);

            AddStaffChecklistItemsAndStaffEvents(staff);

            _staffRepository.MakePersistent(staff);

            return(staff);
        }
Example #3
0
        /// <summary>
        /// Creates the staff.
        /// </summary>
        /// <param name="agency">The agency.</param>
        /// <param name="staffProfile">The staff profile.</param>
        /// <returns>
        /// A Staff
        /// </returns>
        public Staff CreateStaff( Agency agency, StaffProfile staffProfile)
        {
            var staff = new Staff(agency, staffProfile);

            AddStaffChecklistItemsAndStaffEvents(staff);

            _staffRepository.MakePersistent ( staff );

            return staff;
        }
Example #4
0
 /// <summary>
 /// Revises the staff profile info.
 /// </summary>
 /// <param name="staffProfile">
 /// The staff profile.
 /// </param>
 public virtual void ReviseStaffProfileInfo( StaffProfile staffProfile )
 {
     Check.IsNotNull ( staffProfile, () => StaffProfile );
     StaffProfile = staffProfile;
 }
Example #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Staff"/> class.
        /// </summary>
        /// <param name="agency">
        /// The agency.
        /// </param>
        /// <param name="staffProfile">
        /// The staff profile.
        /// </param>
        protected internal Staff( Agency agency, StaffProfile staffProfile )
            : this()
        {
            Check.IsNotNull ( agency, () => Agency );
            Check.IsNotNull ( staffProfile, () => StaffProfile );

            _agency = agency;
            _staffProfile = staffProfile;
        }
Example #6
0
 /// <summary>
 /// Revises the staff profile info.
 /// </summary>
 /// <param name="staffProfile">
 /// The staff profile.
 /// </param>
 public virtual void ReviseStaffProfileInfo(StaffProfile staffProfile)
 {
     Check.IsNotNull(staffProfile, () => StaffProfile);
     StaffProfile = staffProfile;
 }