public int UpdateFrom2()
        {
            _utilServices.EnableFeature("Laser.Orchard.TemplateManagement");
            dynamic t1Content = _orchardServices.ContentManager.New("CustomTemplate");

            _orchardServices.ContentManager.Create(t1Content);
            // Template Sottoscrizione
            t1Content.TemplatePart.Title   = "Newsletter - Subscription Template";
            t1Content.TemplatePart.Text    = "";// File.ReadAllText(_workContextAccessor.GetContext().HttpContext.Server.MapPath("~/Modules/Laser.Orchard.Newsletters/Templates/Subscription.html"));
            t1Content.TemplatePart.Subject = "Newsletter - Conferma iscrizione";
            t1Content = null;
            dynamic t2Content = _orchardServices.ContentManager.New("CustomTemplate");

            _orchardServices.ContentManager.Create(t2Content);
            // Template Annullamento sottoscrizione
            t2Content.TemplatePart.Title   = "Newsletter - Unsubscription Template";
            t2Content.TemplatePart.Text    = ""; // File.ReadAllText(_workContextAccessor.GetContext().HttpContext.Server.MapPath("~/Modules/Laser.Orchard.Newsletters/Templates/Unsubscription.html"));
            t2Content.TemplatePart.Subject = "Newsletter - Conferma cancellazione";
            t2Content = null;
            // Template Newsletter
            dynamic t3Content = _orchardServices.ContentManager.New("CustomTemplate");

            _orchardServices.ContentManager.Create(t3Content);
            t3Content.TemplatePart.Title   = "Newsletter - Edition Template";
            t3Content.TemplatePart.Text    = ""; //File.ReadAllText(_workContextAccessor.GetContext().HttpContext.Server.MapPath("~/Modules/Laser.Orchard.Newsletters/Templates/Newsletter.html"));
            t3Content.TemplatePart.Subject = "Newsletter";
            t3Content = null;
            return(3);
        }
Ejemplo n.º 2
0
        public int UpdateFrom2()
        {
            SchemaBuilder.AlterTable("QuestionnairePartRecord", t => t.AddColumn <bool>("MustAcceptTerms",
                                                                                        col => col.WithDefault(false)));
            SchemaBuilder.AlterTable("QuestionnairePartRecord", t => t.AddColumn <string>("TermsText",
                                                                                          col => col.Unlimited()));
            SchemaBuilder.AlterTable("QuestionnairePartRecord", t => t.AddColumn <bool>("UseRecaptcha",
                                                                                        col => col.WithDefault(false)));
            SchemaBuilder.AlterTable("QuestionRecord", t => t.AddColumn <string>("Section",
                                                                                 col => col.WithLength(200)));
            SchemaBuilder.AlterTable("QuestionRecord", t => t.AddColumn <string>("Condition",
                                                                                 col => col.Unlimited()));
            SchemaBuilder.AlterTable("QuestionRecord", t => t.AddColumn <string>("AnswerType",
                                                                                 col => col.WithLength(50)));
            SchemaBuilder.AlterTable("QuestionRecord", t => t.AddColumn <bool>("IsRequired",
                                                                               col => col.WithDefault(true)));
            SchemaBuilder.AlterTable("QuestionRecord", t => t.AddColumn <string>("ConditionType",
                                                                                 col => col.WithLength(50)));
            SchemaBuilder.AlterTable("UserAnswersRecord", t => t.AddColumn <int>("QuestionnairePartRecord_Id"));
            SchemaBuilder.AlterTable("UserAnswersRecord", t => t.AddColumn <string>("SessionID",
                                                                                    col => col.WithLength(24)));

            _utilsServices.EnableFeature("Orchard.Captcha");
            return(3);
        }
        public int UpdateFrom3()
        {
            SchemaBuilder.AlterTable("ContactFormRecord", table => table
                                     .AddColumn <int>("TemplateRecord_Id", column => column.WithDefault(-1))
                                     );
            SchemaBuilder.AlterTable("ContactFormRecord", table => table
                                     .AddColumn <bool>("EnableUpload", column => column.WithDefault(false))
                                     );
            SchemaBuilder.AlterTable("ContactFormRecord", table => table
                                     .AddColumn <string>("PathUpload")
                                     );

            _utilServices.EnableFeature("Laser.Orchard.TemplateManagement");
            _utilServices.EnableFeature("Laser.Orchard.TemplateManagement.Parsers.Razor");

            _utilServices.EnableFeature("Laser.Orchard.StartupConfig");

            return(4);
        }
Ejemplo n.º 4
0
 public int UpdateFrom13()
 {
     _utilsServices.EnableFeature("Laser.Orchard.ShortLinks");
     _utilsServices.EnableFeature("Laser.Orchard.Queries");
     _utilsServices.EnableFeature("Laser.Orchard.CommunicationGateway");
     return(14);
 }
 public int Create()
 {
     _utilsServices.EnableFeature("Orchard.PublishLater");
     ContentDefinitionManager.AlterPartDefinition("MaintenancePart", b => b
                                                  .Attachable(false));
     ContentDefinitionManager.AlterTypeDefinition("Maintenance", cfg => cfg
                                                  .WithPart("CommonPart")
                                                  .WithPart(typeof(MaintenancePart).Name)
                                                  .WithPart("PublishLaterPart")
                                                  .Creatable(false)
                                                  .Draftable()
                                                  );
     SchemaBuilder.CreateTable("MaintenancePartRecord", table => table
                               .ContentPartVersionRecord()
                               .Column <string>("MaintenanceNotifyType")
                               .Column <string>("MaintenanceNotify")
                               );
     SchemaBuilder.AlterTable("MaintenancePartRecord", table => table
                              .AddColumn("Selected_Tenant", DbType.String));
     return(1);
 }
Ejemplo n.º 6
0
 public int Create()
 {
     _utilsServices.EnableFeature("Orchard.Caching");
     return(1);
 }
Ejemplo n.º 7
0
 public int UpdateFrom19()
 {
     _utilsServices.EnableFeature("Laser.Orchard.ZoneAlternates");
     return(20);
 }
 public int UpdateFrom1()
 {
     _utilsServices.EnableFeature("Orchard.Caching");
     return(2);
 }
Ejemplo n.º 9
0
 public int UpdateFrom2()
 {
     _utilServices.EnableFeature("Laser.Orchard.MailerUtility");
     return(3);
 }