private void SaveComment() { var c = new GoalCommunication(); c.DateCreated = DateTime.Now; c.EnteredBy = SecurityContextManager.Current.CurrentUser.ID; c.GoalID = CurrentGoal.ID; c.Message = tbNewComment.Text; new GoalCommunicationServices().Save(c); HttpPageHelper.UpdateTabs(this); var a = new Activity(); a.AccountID = CurrentProfile.AccountID; a.ActivityType = (int)ActivityType.NEW_GOAL_COMMENT; a.DateCreated = DateTime.Now; a.URL = "/Goals/" + CurrentGoal.ID.ToString(); a.PerformedBy = c.EnteredBy; a.PerformedFor = CurrentProfile.ID; new ActivityServices().Save(a); string emails = ""; foreach (var m in CurrentGoal.Managers) { if (m.RecievesNotifications) { emails += m.PersonRef.Email + ","; } } EmailHelper.SendGoalCommentUpdateNotification(CurrentGoal, emails); }
public void Delete(GoalCommunication item) { new GoalCommunicationRepository().Delete(item); }
public GoalCommunication Save(GoalCommunication item) { return(new GoalCommunicationRepository().SaveOrUpdate(item)); }