Пример #1
0
 /// <summary>
 /// 刪除電子報訂閱
 /// </summary>
 /// <param name="member">被刪除的電子報訂閱</param>
 public void DeleteEpaperEmail(EpaperEmail epaperEmail)
 {
     FTISDao.DeleteEpaperEmail(epaperEmail);
 }
Пример #2
0
 /// <summary>
 /// 更新電子報訂閱
 /// </summary>
 /// <param name="epaperEmail">被更新的電子報訂閱</param>
 /// <returns>更新後的電子報訂閱</returns>
 public EpaperEmail UpdateEpaperEmail(EpaperEmail epaperEmail)
 {
     return FTISDao.UpdateEpaperEmail(epaperEmail);
 }
Пример #3
0
 /// <summary>
 /// 電子報訂閱
 /// </summary>
 /// <param name="epaperEmail">被新增的電子報訂閱</param>
 /// <returns>新增後的電子報訂閱</returns>
 public EpaperEmail CreateEpaperEmail(EpaperEmail epaperEmail)
 {
     return FTISDao.CreateEpaperEmail(epaperEmail);
 }
Пример #4
0
        private void Save(EpaperEmail entity)
        {
            entity.Name = Name;
            entity.Status = Status;
            entity.RegDate = DateTime.Now;

            if (InTypeList != null && InTypeList.Count() > 0)
            {
                entity.InType = String.Join(", ", InTypeList);
            }
            else
            {
                entity.InType = string.Empty;
            }
            entity.Company = Company;
            entity.Email = Email;
            entity.Sex = Sex;
            entity.ReceiveOtherFreeInfo = ReceiveOtherFreeInfo;

            if (entity.EpaperEmailId == 0)
            {
                m_FTISService.CreateEpaperEmail(entity);
            }
            else
            {
                m_FTISService.UpdateEpaperEmail(entity);
            }

            LoadEntity(entity.EpaperEmailId);
        }        
Пример #5
0
 public void Insert()
 {
     EpaperEmail entity = new EpaperEmail();
     Save(entity);
 }
Пример #6
0
 protected void LoadEntity(EpaperEmail entity)
 {
     if (entity != null)
     {
         EntityId = entity.EpaperEmailId;
         Name = entity.Name;
         Status = entity.Status;
         RegDate = entity.RegDate;
         InType = entity.InType;
         Company = entity.Company;
         Email = entity.Email;
         Sex = entity.Sex;
         ReceiveOtherFreeInfo = entity.ReceiveOtherFreeInfo;
     }
 }