public static void TimeAndExpenseLoggedActEntry(this ActEntryTemplatePolicyExpression dsl)
 {
     dsl.ActEntry(1800).DisplayName("Time and expense logged")
         .GetRelatedRecord("act_entry2onsite_log")
         .WithFields("total_time", "total_exp", "notes", "internal_note")
         .UpdateActivityDTOWith(timeAndExpensesUpdater);
 }
 public static void StatusChangedActEntry(this ActEntryTemplatePolicyExpression dsl)
 {
     dsl.ActEntry(300).DisplayName("Status changed")
         .GetRelatedRecord("act_entry2status_chg")
         .WithFields("notes")
         .UpdateActivityDTOWith(statusChangeUpdater);
 }
 public static void EmailOutActEntry(this ActEntryTemplatePolicyExpression dsl)
 {
     dsl.ActEntry(3400).DisplayName("Sent email")
         .GetRelatedRecord("act_entry2email_log")
         .WithFields("message", "recipient", "cc_list")
         .UpdateActivityDTOWith(emailLogUpdater);
 }
 public static void EmailOutActEntry(this ActEntryTemplatePolicyExpression dsl, ISchemaCache schemaCache, IHistoryOutputParser historyOutputParser)
 {
     dsl.ActEntry(3400).DisplayName(HistoryBuilderTokens.LOG_EMAIL_OUT)
         .HtmlizeWith(item => EncodeEmail(historyOutputParser, item))
         .GetRelatedRecord("act_entry2email_log")
         .WithFields(getEmailLogFields(schemaCache))
         .UpdateActivityDTOWith((record, historyItem) => emailLogUpdater(record, historyItem, schemaCache));
 }
 public static void ForwardActEntry(this ActEntryTemplatePolicyExpression dsl)
 {
     dsl.ActEntry(1100).DisplayName(HistoryBuilderTokens.FORWARDED)
         .GetRelatedRecord("act_entry2reject_msg")
         .WithFields("description")
         .UpdateActivityDTOWith((row, dto) =>
         {
             dto.Detail += Environment.NewLine + row.AsString("description");
         });
 }
 public static void NoteActEntry(this ActEntryTemplatePolicyExpression dsl)
 {
     dsl.ActEntry(1700).DisplayName("Note logged")
         .GetRelatedRecord("act_entry2notes_log").WithFields("description", "internal")
         .UpdateActivityDTOWith((record, dto) =>
                                    {
                                        dto.Detail = record["description"].ToString();
                                        dto.Internal = record["internal"].ToString();
                                    });
 }
 public static void LogResearchActEntry(this ActEntryTemplatePolicyExpression dsl)
 {
     dsl.ActEntry(2500).DisplayName(HistoryBuilderTokens.LOG_RESEARCH)
         .GetRelatedRecord("act_entry2resrch_log")
         .WithFields("notes", "internal")
         .UpdateActivityDTOWith((row, dto) =>
         {
             dto.Detail = row["notes"].ToString();
             dto.Internal = row["internal"].ToString();
         });
 }
 public static void PhoneLogActEntry(this ActEntryTemplatePolicyExpression dsl)
 {
     dsl.ActEntry(500).DisplayName("Phone log added")
         .GetRelatedRecord("act_entry2phone_log")
         .WithFields("notes", "internal")
         .UpdateActivityDTOWith((row, dto) =>
                                    {
                                        dto.Detail = row["notes"].ToString();
                                        dto.Internal = row["internal"].ToString();
                                    });
 }
        public static void NoteActEntry(this ActEntryTemplatePolicyExpression dsl, ISchemaCache schemaCache)
        {
            const string noteField = "description";

            if (schemaCache.IsValidField("notes_log", "x_is_internal"))
            {
                dsl.ActEntry(1700).DisplayName(HistoryBuilderTokens.LOG_NOTE)
                    .GetRelatedRecord("act_entry2notes_log")
                    .WithFields(noteField, "internal", "x_is_internal")
                    .UpdateActivityDTOWith((row, dto) => setInternalLog(row, dto, noteField));
                return;
            }

            dsl.ActEntry(1700).DisplayName(HistoryBuilderTokens.LOG_NOTE)
                .GetRelatedRecord("act_entry2notes_log")
                .WithFields(noteField, "internal")
                .UpdateActivityDTOWith((row, dto) =>
                {
                    dto.Detail = row[noteField].ToString();
                    dto.Internal = row["internal"].ToString();
                });
        }
 public static void TimeAndExpenseLoggedDeletedActEntry(this ActEntryTemplatePolicyExpression dsl)
 {
     dsl.ActEntry(10600).DisplayName(HistoryBuilderTokens.LOG_EXPENSES_DELETED)
         .GetRelatedRecord("act_entry2onsite_log")
         .WithFields("total_time", "total_exp", "notes", "internal_note")
         .UpdateActivityDTOWith(timeAndExpensesUpdater);
 }
 public static void TimeAndExpenseEdittedActEntry(this ActEntryTemplatePolicyExpression dsl)
 {
     dsl.ActEntry(8700).DisplayName(HistoryBuilderTokens.LOG_EXPENSES_EDITTED);
 }
 public static void StatusChangedActEntry(this ActEntryTemplatePolicyExpression dsl)
 {
     dsl.ActEntry(300).DisplayName(HistoryBuilderTokens.STATUS_CHANGE)
         .GetRelatedRecord("act_entry2status_chg")
         .WithFields("notes")
         .UpdateActivityDTOWith(statusChangeUpdater);
 }
 public static void TimeAndExpenseEdittedActEntry(this ActEntryTemplatePolicyExpression dsl)
 {
     dsl.ActEntry(8700).DisplayName("Time and expenses edited");
 }