Пример #1
0
        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);
        }
Пример #2
0
        protected void AddMilestoneClicked(object o, EventArgs e)
        {
            //divMilestoneContainer.Controls.Clear();
            //Control c = LoadControl("/Views/GoalMilestoneView.ascx");
            //c.ID = "milestones" + MilestoneControls.Count.ToString();
            //MilestoneControls = null;
            //MilestoneControls.Add((HRR.Website.Views.GoalMilestoneView)c);
            //divMilestoneContainer.Controls.Add(c);
            //CreateUserControl("lbAddNewMilestone");
            var ms = new GoalMilestone();

            ms.AccountID   = SecurityContextManager.Current.CurrentUser.AccountID;
            ms.ChangedBy   = SecurityContextManager.Current.CurrentUser.ID;
            ms.DateCreated = DateTime.Now;
            ms.Description = tbMilestoneDescription.Text;
            ms.DueDate     = (DateTime)tbMilestoneDueDate.SelectedDate;
            ms.EnteredBy   = SecurityContextManager.Current.CurrentUser.ID;
            ms.EnteredFor  = CurrentProfile.ID;
            ms.GoalID      = CurrentGoal.ID;
            ms.IsAccepted  = true;
            ms.IsComplete  = false;
            ms.LastUpdated = DateTime.Now;
            ms.Status      = (int)GoalStatus.ACCEPTED;
            ms.Title       = tbMilestoneTitle.Text;
            new GoalMilestoneServices().Save(ms);
            HttpPageHelper.UpdateTabs(this);
            tbMilestoneTitle.Text             = "";
            tbMilestoneDueDate.SelectedDate   = null;
            tbMilestoneDueDate.DateInput.Text = "";
            tbMilestoneDescription.Text       = "";
            LoadMilestones(true);
        }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     HttpPageHelper.SetImagesPath(reContent);
     if (!IsPostBack)
     {
         if (SecurityContextManager.Current.CurrentURL.Contains("/edit"))
         {
             LoadPageContent();
             LoadLinks(true);
         }
     }
 }
Пример #4
0
 protected void SaveMilestoneClicked(object o, EventArgs e)
 {
     SaveMilestone();
     HttpPageHelper.UpdateTabs((HRR.Website.Goal) this.Parent.Page);
 }
Пример #5
0
        protected void ExportToCalendar(object o, EventArgs e)
        {
            string desc = "Click here to view goal: " + ConfigurationManager.AppSettings["BASEURL"] + "/Goals/" + CurrentGoal.ID.ToString();

            HttpPageHelper.ExportToCalendar((DateTime)CurrentGoal.DueDate, (DateTime)CurrentGoal.DueDate, "TBD", desc, "Goal:" + CurrentGoal.Title + " is due!!");
        }
Пример #6
0
        protected void ExportToCalendar(object o, EventArgs e)
        {
            string desc = "Follow up on comment left by " + CurrentComment.EnteredByRef.Name + ".  Click here to view comment: " + ConfigurationManager.AppSettings["BASEURL"] + "/Comments/" + CurrentComment.ID.ToString();

            HttpPageHelper.ExportToCalendar((DateTime)CurrentComment.FollowUpDate, (DateTime)CurrentComment.FollowUpDate, "TBD", desc, "Follow Up Construct Comment For " + CurrentComment.EnteredForRef.Name);
        }
Пример #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     LoadNews();
     HttpPageHelper.SetImagesPath(reContent);
 }