Esempio n. 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;
        }
Esempio n. 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);
        }
Esempio n. 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;
        }
Esempio n. 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;
 }
Esempio n. 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;
        }
Esempio n. 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;
 }