protected void LoadEntity(Epaper entity) { if (entity != null) { ENo = entity.ENo; EntityId = entity.EpaperId; Name = entity.Name; SortId = entity.SortId; Status = entity.Status; PostDate = entity.PostDate; AUrl = entity.AUrl; Vister = entity.Vister; } }
private void Save(Epaper entity) { entity.ENo = ENo; entity.Name = Name; entity.SortId = SortId; entity.Status = Status; entity.PostDate = PostDate; entity.AUrl = AUrl; entity.Vister = Vister; if (entity.EpaperId == 0) { m_FTISService.CreateEpaper(entity); } else { m_FTISService.UpdateEpaper(entity); } LoadEntity(entity.EpaperId); }
/// <summary> /// 刪除電子報 /// </summary> /// <param name="epaper">被刪除的電子報</param> public void DeleteEpaper(Epaper epaper) { FTISDao.DeleteEpaper(epaper); }
/// <summary> /// 更新電子報 /// </summary> /// <param name="epaper">被更新的電子報</param> /// <returns>更新後的電子報</returns> public Epaper UpdateEpaper(Epaper epaper) { return FTISDao.UpdateEpaper(epaper); }
/// <summary> /// 新增電子報 /// </summary> /// <param name="epaper">被新增的電子報</param> /// <returns>新增後的電子報</returns> public Epaper CreateEpaper(Epaper epaper) { return FTISDao.CreateEpaper(epaper); }
public void Insert() { Epaper entity = new Epaper(); Save(entity); }