예제 #1
0
 public string GetPrettyTitleLink()
 {
     if (Title == null)
     {
         return(MovieId.ToString());
     }
     return(HttpUtility.UrlEncode(Title.ToLower().Replace(' ', '-')));
 }
        private int generateHashCode()
        {
            //THis is expensive and should be done only once since it will not be changing
            //TODO - use / include the "correct" id..
            String key = this.GetType().Name + MovieCollectionId.ToString() + MovieId.ToString();

            //Google: "disable fips mode" if the line below fails
            System.Security.Cryptography.MD5 md5Hasher = System.Security.Cryptography.MD5.Create();
            var hashed = md5Hasher.ComputeHash(Encoding.UTF8.GetBytes(key));
            int ivalue = BitConverter.ToInt32(hashed, 0);

            return(ivalue);
        }
예제 #3
0
 public override string ToString()
 {
     return("Seance_id: " + Id + " Price: " + Price + " Time: " + Time.ToShortTimeString() + " Hall: " + HallId
            + "\n    Movie: " + Movie != null?Movie.ToString() : MovieId.ToString());
 }