Exemple #1
0
    /// <summary>
    /// Reminder button OK clicked.
    /// </summary>
    /// <param name="sender">Sender object</param>
    /// <param name="e">Event args</param>
    protected void btnReminderOK_onClick(object sender, EventArgs e)
    {
        string errorMessage = "";

        if (txtReminderText.Text.Length > 0)
        {
            ProjectTaskInfo taskInfo = ProjectTaskInfoProvider.GetProjectTaskInfo(this.ReminderTaskID);
            if (taskInfo != null)
            {
                if (taskInfo.ProjectTaskAssignedToUserID > 0)
                {
                    ProjectTaskInfoProvider.SendNotificationEmail(ProjectTaskEmailNotificationTypeEnum.TaskReminder, taskInfo, CMSContext.CurrentSiteName, txtReminderText.Text);
                    lblInfo.Text = GetString("pm.projecttask.remindersent");
                }
                else
                {
                    errorMessage = GetString("pm.projecttask.remindernoassignee");
                }
            }
        }
        else
        {
            errorMessage = GetString("pm.projecttask.remindermessageerror");
        }

        if (String.IsNullOrEmpty(errorMessage))
        {
            CloseAjaxWindow();
        }
        else
        {
            ShowReminderPopup();
            lblReminderError.Text = errorMessage;
        }
    }