Esempio n. 1
0
		private void LoadStaff()
		{
            StaffId = String.IsNullOrEmpty(Request.QueryString["xID"]) ? 59494 : GetDecryptedEntityId(X_ID);
			var key = "Staff_" + StaffId;
			if (!RecordExistsInCache(key))
			{
				SelectedStaff = Base.Classes.Staff.GetStaffByID(StaffId);
				Base.Classes.Cache.Insert(key, SelectedStaff);
			}
			else
			{
				SelectedStaff = ((Base.Classes.Staff) Base.Classes.Cache.Get(key));
			}

			staffName.Text = String.Concat(SelectedStaff.FirstName, " ", SelectedStaff.MiddleName, " ", SelectedStaff.LastName);
				
			if (!String.IsNullOrEmpty(SelectedStaff.Picture))
				staffImage.ImageUrl = AppSettings.ProfileImageUserWebPath + '/' + SelectedStaff.Picture;

            /* Stash the staff guid into a hidden element so the javascript 
                * code for this page can access it on the browser side.
                */
            StaffGuid.Value = SelectedStaff.UserID.ToString();
		}
 private void LoadStaff()
 {
     if (Request.QueryString["xID"] == null)
     {
         SessionObject.RedirectMessage = "No entity ID provided in URL.";
         Response.Redirect("~/PortalSelection.aspx", true);
     }
     else
     {
         _selectedStaff = Base.Classes.Staff.GetStaffByID(DataIntegrity.ConvertToInt(GetDecryptedEntityId(X_ID))); 
     }
 }