Exemplo n.º 1
0
 public static string ShowPropertyPhotoWithoutBacklinkTravel(DataRow DataRow)
 {
     if ((DataRow["FileName"] is string) && (DataRow["Width"] is int) && (DataRow["Height"] is int))
     {
         string urlgen = String.Format("<a href='{0}'><img src='{1}{2}' width='{3}' height='{4}' alt='{5}' /></a>", CommonFunctions.PrepareURL(DataRow["Country"].ToString().Replace(" ", "_") + "/" + DataRow["StateProvince"].ToString().Replace(" ", "_") + "/" + DataRow["City"].ToString().Replace(" ", "_") + "/" + DataRow["ID"].ToString() + "/default.aspx"), ConfigurationManager.AppSettings["ImagesVirtualLocation"], (string)DataRow["FileName"], CommonFunctions.CalculatePhotoWidth((int)DataRow["Width"], (int)DataRow["Height"], 100), CommonFunctions.CalculatePhotoHeight((int)DataRow["Width"], (int)DataRow["Height"], 100), "Travel Agent " + DataRow["Type"].ToString() + " in " + DataRow["City"].ToString() + ", " + DataRow["Country"].ToString());
         return(urlgen.ToLower());
     }
     else
     {
         return("");
     }
 }