private void setDBNotice(int userSN, string upLoadType, string sumCount) { List <Vw_UserTrack> userTrackList = UserTrackModel.getTrackerListBySN(userSN); string type = string.Empty; switch (upLoadType) { case "img": type = " 張圖片"; break; case "Doc": type = " 件文件"; break; case "Compression": type = "個壓縮檔"; break; } foreach (var item in userTrackList) { Rio_Notice notice = new Rio_Notice(); notice.AccountSN = userSN; notice.TrackSN = item.AccountSN; notice.NoticeContent = "已上傳 " + sumCount + type; notice.CreateDate = DateTime.Now; NoticeModel.Insert(notice); } }
private void setDBNotice(int userSN, string userID, string albumTitle, string action) { List <Vw_UserTrack> userTrackList = UserTrackModel.getTrackerListBySN(userSN); foreach (var item in userTrackList) { Rio_Notice notice = new Rio_Notice(); notice.AccountSN = userSN; notice.TrackSN = item.AccountSN; notice.NoticeContent = "已" + action + albumTitle + "相簿"; notice.CreateDate = DateTime.Now; NoticeModel.Insert(notice); } }