예제 #1
0
 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;                
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
 /// <summary>
 /// 刪除電子報
 /// </summary>
 /// <param name="epaper">被刪除的電子報</param>
 public void DeleteEpaper(Epaper epaper)
 {
     FTISDao.DeleteEpaper(epaper);
 }
예제 #4
0
 /// <summary>
 /// 更新電子報
 /// </summary>
 /// <param name="epaper">被更新的電子報</param>
 /// <returns>更新後的電子報</returns>
 public Epaper UpdateEpaper(Epaper epaper)
 {
     return FTISDao.UpdateEpaper(epaper);
 }
예제 #5
0
 /// <summary>
 /// 新增電子報
 /// </summary>
 /// <param name="epaper">被新增的電子報</param>
 /// <returns>新增後的電子報</returns>
 public Epaper CreateEpaper(Epaper epaper)
 {
     return FTISDao.CreateEpaper(epaper);
 }
예제 #6
0
 public void Insert()
 {
     Epaper entity = new Epaper();
     Save(entity);
 }