Esempio n. 1
0
        public void SavePhoto(PhotoLink fileInfo, byte[] fileData)
        {
            using (TransactionScope scope = new TransactionScope())
            {
                FileUploadUtil uploadUtil = new FileUploadUtil();
                uploadUtil.SaveFile(fileInfo.Url, fileData);

                LinkItems.Dalc.LinkItemsDataAccess dalc = new LinkItemsDataAccess();
                dalc.InsertLinkItem(fileInfo.Title, fileInfo.Description, fileInfo.Url, LinkItemTypes.Image, DateTime.Now, null, fileInfo.Category);

                scope.Complete();
            }
        }
Esempio n. 2
0
 public PhotoLink GetPhoto(int id)
 {
     LinkItems.Dalc.LinkItemsDataAccess dalc = new LinkItemsDataAccess();
     return(dalc.GetLinkItem <PhotoLink>(id));
 }
Esempio n. 3
0
 public List <string> GetCategories()
 {
     LinkItems.Dalc.LinkItemsDataAccess dalc = new LinkItemsDataAccess();
     return(dalc.GetCategories());
 }
Esempio n. 4
0
 public List <PhotoLink> GetPhotos()
 {
     LinkItems.Dalc.LinkItemsDataAccess dalc = new LinkItemsDataAccess();
     return(dalc.GetLinkItems <PhotoLink>());
 }