public SlideShowItem(string Image, bool Enable, string Url) { this.Id = Guid.NewGuid().ToString(); this.Image = Image; this.Enable = Enable; this.Url = Url; this.Sort = SlideShowItemManager.GetSort(); this.UpdateTime = DateTime.Now; this.CreateTime = DateTime.Now; }
public static void Remove(SlideShowItem SlideShowItem) { //更新資料庫 SlideShowItemAccessor.Delete(SlideShowItem); //更新記憶体 SlideShowItemCache.Remove(SlideShowItem); //刪除圖片 if (string.IsNullOrWhiteSpace(SlideShowItem.Image) == false) { System.IO.File.Delete(SlideShowItemManager.GetPhysicalUploadPath() + SlideShowItem.Image); } }