protected void LoadEntity(Download entity) { if (entity != null) { EntityId = entity.DownloadId; Name = entity.Name; SortId = entity.SortId; Status = entity.Status; PostDate = entity.PostDate; Content = entity.Content; AFile1 = entity.AFile1; AFile1Name = entity.AFile1Name; IsOut = entity.IsOut; AUrl = entity.AUrl; Vister = entity.Vister; Downer = entity.Downer; MainCode = entity.MainCode; MainName = entity.MainName; AdminCode = entity.AdminCode; AdminName = entity.AdminName; ServiceCode = entity.ServiceCode; ServiceName = entity.ServiceName; } }
/// <summary> /// 刪除技術工具/文件下載 /// </summary> /// <param name="download">被刪除的技術工具/文件下載</param> public void DeleteDownload(Download download) { FTISDao.DeleteDownload(download); }
/// <summary> /// 更新技術工具/文件下載 /// </summary> /// <param name="download">被更新的技術工具/文件下載</param> /// <returns>更新後的技術工具/文件下載</returns> public Download UpdateDownload(Download download) { return FTISDao.UpdateDownload(download); }
/// <summary> /// 技術工具/文件下載 /// </summary> /// <param name="download">被新增的技術工具/文件下載</param> /// <returns>新增後的技術工具/文件下載</returns> public Download CreateDownload(Download download) { return FTISDao.CreateDownload(download); }
private void Save(Download entity) { entity.Name = Name; entity.SortId = SortId; entity.Status = Status; entity.PostDate = PostDate; entity.Content = Content; entity.AFile1 = AFile1; entity.AFile1Name = AFile1Name; entity.IsOut = IsOut; entity.AUrl = AUrl; entity.Vister = Vister; entity.Downer = Downer; entity.MainCode = MainCode; entity.MainName = MainName; entity.AdminCode = AdminCode; entity.AdminName = AdminName; entity.ServiceCode = ServiceCode; entity.ServiceName = ServiceName; if (entity.DownloadId == 0) { m_FTISService.CreateDownload(entity); } else { m_FTISService.UpdateDownload(entity); } LoadEntity(entity.DownloadId); }
public void Insert() { Download entity = new Download(); Save(entity); }