Пример #1
0
        /// <summary>
        /// Update fields passed in
        /// Updates all fields to be the values passed in
        /// Does NOT update the ID field, this allows for the method to be used as part of a copy.
        /// Does NOT update the Date field, this allows for the method to be used as part of a copy.
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public bool Update(TechnicianModel data)
        {
            if (data == null)
            {
                return(false);
            }

            // Update all the other fields
            FirstName      = data.FirstName;
            LastName       = data.LastName;
            Street         = data.Street;
            City           = data.City;
            State          = data.State;
            Country        = data.Country;
            PostalCode     = data.PostalCode;
            Bio            = data.Bio;
            ClinicID       = data.ClinicID;
            OrganizationID = data.OrganizationID;
            EulaAccepted   = data.EulaAccepted;
            IsActive       = data.IsActive;

            return(true);
        }
Пример #2
0
 /// <summary>
 /// Makes a copy of the data
 /// </summary>
 /// <param name="data"></param>
 public TechnicianModel(TechnicianModel data)
 {
     // Because this is a copy, let it have a new ID
     Update(data);
 }