C# Class AspNet.StarterKits.Classifieds.BusinessLogicLayer.PhotosDB

Datei anzeigen Open project: mono/gert

Public Methods

Method Description
GetFilePath ( int photoId, bool forUrl, PhotoSize size ) : string
GetPhotoBytesById ( int photoId, PhotoSize size ) : byte[]
GetPhotosByAdId ( int adId ) : AdsDataComponent.PhotosDataTable
InsertPhoto ( int adId, byte bytesFull, byte bytesMedium, byte bytesSmall, bool useAsPreview ) : int
RemovePhotoById ( int id ) : bool
RemovePhotosByAdId ( int adId ) : void
RemovePhotosOfDeletedAds ( ) : void
ResizeImageFile ( byte imageFile, PhotoSize size ) : byte[]
SetAdPreviewPhoto ( int adId, int photoId ) : void

Private Methods

Method Description
DeleteFile ( string filename ) : void
DeleteLocalPhotoFiles ( int photoId ) : bool
PhotosDB ( ) : System
RemovePhotoFilesInTable ( AdsDataComponent photosToDelete ) : void
WriteToFile ( string filename, byte bytes ) : void

Method Details

GetFilePath() public static method

public static GetFilePath ( int photoId, bool forUrl, PhotoSize size ) : string
photoId int
forUrl bool
size PhotoSize
return string

GetPhotoBytesById() public static method

public static GetPhotoBytesById ( int photoId, PhotoSize size ) : byte[]
photoId int
size PhotoSize
return byte[]

GetPhotosByAdId() public static method

public static GetPhotosByAdId ( int adId ) : AdsDataComponent.PhotosDataTable
adId int
return AdsDataComponent.PhotosDataTable

InsertPhoto() public static method

public static InsertPhoto ( int adId, byte bytesFull, byte bytesMedium, byte bytesSmall, bool useAsPreview ) : int
adId int
bytesFull byte
bytesMedium byte
bytesSmall byte
useAsPreview bool
return int

RemovePhotoById() public static method

public static RemovePhotoById ( int id ) : bool
id int
return bool

RemovePhotosByAdId() public static method

public static RemovePhotosByAdId ( int adId ) : void
adId int
return void

RemovePhotosOfDeletedAds() public static method

public static RemovePhotosOfDeletedAds ( ) : void
return void

ResizeImageFile() public static method

public static ResizeImageFile ( byte imageFile, PhotoSize size ) : byte[]
imageFile byte
size PhotoSize
return byte[]

SetAdPreviewPhoto() public static method

public static SetAdPreviewPhoto ( int adId, int photoId ) : void
adId int
photoId int
return void