public ProfileModel(int ID)
        {
            ProfileCollection collection = new ProfileCollection();

            Profiles.Business.Profile userProfile = collection.GetProfile(ID);

            FullName        = userProfile.FirstName + " " + userProfile.LastName;
            SPIERole        = userProfile.SPIERole;
            Company         = userProfile.Company;
            JobTitle        = userProfile.JobTitle;
            PictureFileName = userProfile.PictureFileName;
        }
        public ProfileModel(int ID, string filter = "")
        {
            DatabaseService   service    = new DatabaseService();
            ProfileCollection collection = new ProfileCollection(service)
            {
                FilterText = filter
            };

            Profiles.Business.Profile userProfile = collection.GetProfile(ID);

            FullName        = userProfile.FirstName + " " + userProfile.LastName;
            SPIERole        = userProfile.SPIERole;
            Company         = userProfile.Company;
            JobTitle        = userProfile.JobTitle;
            PictureFileName = userProfile.PictureFileName;
        }
        public ProfileModel(int ID)
        {
            //Retrieve current selection of profiles
            ProfileCollection collection = new ProfileCollection();

            //Determine if queried profile exists
            Profiles.Business.Profile userProfile = collection.GetProfile(ID);
            if (userProfile != null)
            {
                FullName        = userProfile.FirstName + " " + userProfile.LastName;
                SPIERole        = userProfile.SPIERole;
                Company         = userProfile.Company;
                JobTitle        = userProfile.JobTitle;
                PictureFileName = userProfile.PictureFileName;
            }
            else
            {
                throw new Exception("Profile doesn't exist");
            }
        }
Beispiel #4
0
        public IEnumerable <Patient> Index(int id)
        {
            Profile phys = _collection.GetProfile(id);

            return(phys.Patients);
        }
Beispiel #5
0
 public Profile Get(int id)
 {
     return(_collection.GetProfile(id));
 }