コード例 #1
0
ファイル: FileResourcePhoto.cs プロジェクト: sitkatech/alevin
 public FileResourcePhoto(FirmaHomePageImage firmaHomePage)
 {
     PrimaryKey              = firmaHomePage.FirmaHomePageImageID;
     FileResourceInfo        = firmaHomePage.FileResourceInfo;
     DeleteUrl               = firmaHomePage.GetDeleteUrl();
     IsKeyPhoto              = false;
     Caption                 = firmaHomePage.Caption;
     CaptionOnFullView       = firmaHomePage.GetCaptionOnFullView();
     CaptionOnGallery        = firmaHomePage.GetCaptionOnGallery();
     PhotoUrl                = firmaHomePage.GetPhotoUrl();
     PhotoUrlScaledThumbnail = firmaHomePage.GetPhotoUrlScaledThumbnail();
     EditUrl                 = firmaHomePage.GetEditUrl();
     AdditionalCssClasses    = new List <string>();
 }
コード例 #2
0
 public static string GetDeleteUrl(this FirmaHomePageImage firmaHomePageImage)
 {
     return(SitkaRoute <FirmaHomePageImageController> .BuildUrlFromExpression(x =>
                                                                              x.DeleteFirmaHomePageImage(firmaHomePageImage.FirmaHomePageImageID)));
 }
コード例 #3
0
 public static string GetPhotoUrlScaledForPrint(this FirmaHomePageImage firmaHomePageImage) => firmaHomePageImage.FileResourceInfo.GetFileResourceUrlScaledForPrint();
コード例 #4
0
 public static string GetPhotoUrlScaledThumbnail(this FirmaHomePageImage firmaHomePageImage) => firmaHomePageImage.FileResourceInfo.FileResourceUrlScaledThumbnail(150);
コード例 #5
0
 public static string GetCaptionOnGallery(this FirmaHomePageImage firmaHomePageImage) => $"{firmaHomePageImage.Caption}\r\n{firmaHomePageImage.FileResourceInfo.GetFileResourceDataLengthString()}";
コード例 #6
0
 public static string GetCaptionOnFullView(this FirmaHomePageImage firmaHomePageImage) => $"{firmaHomePageImage.GetCaptionOnGallery()}";
 public static void DeleteFirmaHomePageImage(this IQueryable <FirmaHomePageImage> firmaHomePageImages, FirmaHomePageImage firmaHomePageImageToDelete)
 {
     DeleteFirmaHomePageImage(firmaHomePageImages, new List <FirmaHomePageImage> {
         firmaHomePageImageToDelete
     });
 }