/// <summary>
 /// 刪除會員下載紀錄
 /// </summary>
 /// <param name="downloadRecord">被刪除的會員下載紀錄</param>
 public void DeleteDownloadRecord(DownloadRecord downloadRecord)
 {
     FTISDao.DeleteDownloadRecord(downloadRecord);
 }
 /// <summary>
 /// 會員下載紀錄
 /// </summary>
 /// <param name="downloadRecord">被新增的會員下載紀錄</param>
 /// <returns>新增後的會員下載紀錄</returns>
 public DownloadRecord CreateDownloadRecord(DownloadRecord downloadRecord)
 {
     return FTISDao.CreateDownloadRecord(downloadRecord);
 }
 /// <summary>
 /// 更新會員下載紀錄
 /// </summary>
 /// <param name="downloadRecord">被更新的會員下載紀錄</param>
 /// <returns>更新後的會員下載紀錄</returns>
 public DownloadRecord UpdateDownloadRecord(DownloadRecord downloadRecord)
 {
     return FTISDao.UpdateDownloadRecord(downloadRecord);
 }
        public void AddDownloadRecord(string name, string classId, string memberId)
        {
            if (string.IsNullOrWhiteSpace(name) || string.IsNullOrWhiteSpace(classId) || string.IsNullOrWhiteSpace(memberId))
            {
                return;
            }

            string postDate = DateTime.Today.ToString("yyyy/M/d");
            IDictionary<string, string> conditions = new Dictionary<string, string>();
            conditions.Add("Name", name);
            conditions.Add("ClassId", classId);
            conditions.Add("MemberId", memberId);
            conditions.Add("PostDate", postDate);

            ////今天下載過就不再紀錄
            if (m_FTISService.GetDownloadRecordCount(conditions) == 0)
            {
                DownloadRecord downloadRecord = new DownloadRecord()
                {
                    Name = name,
                    ClassId = classId,
                    Member = m_FTISService.GetMemberById(int.Parse(memberId)),
                    PostDate = postDate
                };
                m_FTISService.CreateDownloadRecord(downloadRecord);
            }
        }