public void AddComment(Comment c) { alert = new Alert(); alert.CreateDate = c.CreateDate; if (c.SystemObjectID == 1) { _statusUpdateRepository = new StatusUpdateRepository(); StatusUpdate st = _statusUpdateRepository.GetStatusUpdateByID((int)c.SystemObjectRecordID); account=_accountRepository.GetAccountByID(st.SenderID); alertMessage = GetProfileUrl(c.CommentByUsername)+" bình luận status của "+ GetProfileUrl(account.UserName)+":" + c.Body; alert.Message = alertMessage; alert.AccountID = c.CommentByAccountID; alert.AlertTypeID = (int)AlertType.AlertTypes.Comment; SaveAlert(alert); Notification notification = new Notification(); string notify = "<a href=\"/UserProfile2.aspx?AccountID=" + c.CommentByAccountID.ToString() + "\">" + c.CommentByUsername + "</a>" + "vừa mới bình luận status của bạn: " + c.Body; notification.AccountID = st.SenderID; notification.CreateDate = c.CreateDate; notification.IsRead =false; notification.Body = notify; _notifycationRepository.SaveNotification(notification); } }
public StatusUpdateService() { _statusRepository = new StatusUpdateRepository(); _alertService = new AlertService(); _privacyService = new PrivacyService(); }
public StatusUpdateService() { _statusRepository = new StatusUpdateRepository(); _alertService = new AlertService(); _privacyService = new PrivacyService(); }