Beispiel #1
0
 public static ImageModel FromImage(get_image_by_type_Result image, bool isGallery)
 {
     return new ImageModel
     {
         ImageId = image.image_id,
         ImageBackgroundPath = String.Format("url('{0}')", "../Content/UploadImage/" + image.path),
         ImagePath = "../Content/UploadImage/" + image.path,
         UploadTime = image.upload_date,
         Title = image.title,
         Description = image.description,
         Width = image.width.GetValueOrDefault(),
         Height = image.height.GetValueOrDefault(),
         ImagePathThum = "../Content/UploadImage/" + image.path.Replace(".jpg", "_thum.jpg")
     };
 }
Beispiel #2
0
 public static ImageModel FromImage(get_image_by_type_Result image)
 {
     return new ImageModel
     {
         ImageId = image.image_id,
         ImagePath = image.path,
         UploadTime = image.upload_date,
         Title = image.title,
         Description = image.description,
         ImagePathThum = image.path.Replace(".jpg", "_thum.jpg")
     };
 }