public AddJudgeDemoOrTest()
        {
            var templateFactory = NotifyTemplateFactory.Get();

            _ejudJudgeDemoOrTest = templateFactory.EJudJudgeDemoOrTest.Value;
            _judgeDemoOrTest     = templateFactory.JudgeDemoOrTest.Value;
        }
Пример #2
0
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            var templateFactory = NotifyTemplateFactory.Get();

            migrationBuilder.InsertData(
                nameof(Template),
                new[] { "NotifyTemplateId", "NotificationType", "MessageType", "Parameters" },
                new object[, ]
            {
                {
                    templateFactory.TelephoneHearingConfirmation, (int)NotificationType.TelephoneHearingConfirmation,
                    (int)MessageType.Email,
                    "case name,case number,name,day month year,time"
                },
                {
                    templateFactory.TelephoneHearingConfirmationMultiDay, (int)NotificationType.TelephoneHearingConfirmationMultiDay,
                    (int)MessageType.Email,
                    "case name,case number,name,day month year,time,number of days"
                }
            });
        }
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            var templateFactory = NotifyTemplateFactory.Get();

            migrationBuilder.InsertData(
                nameof(Template),
                new[] { "NotifyTemplateId", "NotificationType", "MessageType", "Parameters" },
                new object[, ]
            {
                {
                    templateFactory.CreateStaffMember, (int)NotificationType.CreateStaffMember,
                    (int)MessageType.Email,
                    "Name,Username,Password"
                },
                {
                    templateFactory.HearingAmendmentStaffMember, (int)NotificationType.HearingAmendmentStaffMember,
                    (int)MessageType.Email,
                    "case name,case number,staff member,New Day Month Year,Old Day Month Year,New time,Old time"
                },
                {
                    templateFactory.HearingConfirmationStaffMember, (int)NotificationType.HearingConfirmationStaffMember,
                    (int)MessageType.Email,
                    "case name,case number,staff member,day month year,time,username"
                },
                {
                    templateFactory.HearingConfirmationStaffMemberMultiDay, (int)NotificationType.HearingConfirmationStaffMemberMultiDay,
                    (int)MessageType.Email,
                    "case name,case number,staff member,Start Day Month Year,time,number of days,username"
                },
                {
                    templateFactory.StaffMemberDemoOrTest, (int)NotificationType.StaffMemberDemoOrTest,
                    (int)MessageType.Email,
                    "test type,date,time,case number,staff member"
                },
            });
        }
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            var templateFactory = NotifyTemplateFactory.Get();

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.CreateIndividual,
                column: "NotifyTemplateId",
                value: templateFactory.CreateIndividual.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.CreateRepresentative,
                column: "NotifyTemplateId",
                value: templateFactory.CreateRepresentative.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.PasswordReset,
                column: "NotifyTemplateId",
                value: templateFactory.PasswordReset.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingConfirmationLip,
                column: "NotifyTemplateId",
                value: templateFactory.HearingConfirmationLip.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingConfirmationRepresentative,
                column: "NotifyTemplateId",
                value: templateFactory.HearingConfirmationRepresentative.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingConfirmationJudge,
                column: "NotifyTemplateId",
                value: templateFactory.HearingConfirmationJudge.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingConfirmationJoh,
                column: "NotifyTemplateId",
                value: templateFactory.HearingConfirmationJoh.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingConfirmationLipMultiDay,
                column: "NotifyTemplateId",
                value: templateFactory.HearingConfirmationLipMultiDay.Value);


            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingConfirmationRepresentativeMultiDay,
                column: "NotifyTemplateId",
                value: templateFactory.HearingConfirmationRepresentativeMultiDay.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingConfirmationJudgeMultiDay,
                column: "NotifyTemplateId",
                value: templateFactory.HearingConfirmationJudgeMultiDay.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingConfirmationJohMultiDay,
                column: "NotifyTemplateId",
                value: templateFactory.HearingConfirmationJohMultiDay.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingAmendmentLip,
                column: "NotifyTemplateId",
                value: templateFactory.HearingAmendmentLip.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingAmendmentRepresentative,
                column: "NotifyTemplateId",
                value: templateFactory.HearingAmendmentRepresentative.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingAmendmentJudge,
                column: "NotifyTemplateId",
                value: templateFactory.HearingAmendmentJudge.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingAmendmentJoh,
                column: "NotifyTemplateId",
                value: templateFactory.HearingAmendmentJoh.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingReminderLip,
                column: "NotifyTemplateId",
                value: templateFactory.HearingReminderLip.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingReminderRepresentative,
                column: "NotifyTemplateId",
                value: templateFactory.HearingReminderRepresentative.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingReminderJoh,
                column: "NotifyTemplateId",
                value: templateFactory.HearingReminderJoh.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingConfirmationEJudJudge,
                column: "NotifyTemplateId",
                value: templateFactory.HearingConfirmationEJudJudge.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingConfirmationEJudJudgeMultiDay,
                column: "NotifyTemplateId",
                value: templateFactory.HearingConfirmationEJudJudgeMultiDay.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingAmendmentEJudJudge,
                column: "NotifyTemplateId",
                value: templateFactory.HearingAmendmentEJudJudge.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingAmendmentEJudJoh,
                column: "NotifyTemplateId",
                value: templateFactory.HearingAmendmentEJudJoh.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingReminderEJudJoh,
                column: "NotifyTemplateId",
                value: templateFactory.HearingReminderEJudJoh.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingConfirmationEJudJoh,
                column: "NotifyTemplateId",
                value: templateFactory.HearingConfirmationEJudJoh.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.HearingConfirmationEJudJohMultiDay,
                column: "NotifyTemplateId",
                value: templateFactory.HearingConfirmationEJudJohMultiDay.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.EJudJohDemoOrTest,
                column: "NotifyTemplateId",
                value: templateFactory.EJudJohDemoOrTest.Value);

            migrationBuilder.UpdateData(
                table: nameof(Template),
                keyColumn: "NotificationType",
                keyValue: (int)NotificationType.ParticipantDemoOrTest,
                column: "NotifyTemplateId",
                value: templateFactory.ParticipantDemoOrTest.Value);
        }