예제 #1
0
        private static void Init(Entities.Culture culture)
        {
            JobProgress progress = progressController.Jobs.GetByName("Init");

            if (progress == null)
            {
                progress = progressController.CreateJob(0, 27, "Init");
            }
            else
            {
                progress.MinValue = 0;
                progress.MaxValue = 27;
            }

            Currencies.Init(settings.SqlConnectionString);
            progress.Value++;

            Types.Init(settings.SqlConnectionString);
            progress.Value++;

            Categories.Init(settings.SqlConnectionString);
            progress.Value++;

            Employees.Init(settings.SqlConnectionString);
            progress.Value++;

            SignUpTypes.Init(settings.SqlConnectionString, culture);
            progress.Value++;

            PersonTitleTypes.Init(settings.SqlConnectionString, culture);
            progress.Value++;

            ContactMediaTypes.Init(settings.SqlConnectionString, culture);
            progress.Value++;

            TourTypes.Init(settings.SqlConnectionString, culture);
            progress.Value++;

            PaymentTypes.Init(settings.SqlConnectionString, culture);
            progress.Value++;

            TourMembershipTypes.Init(settings.SqlConnectionString, culture);
            progress.Value++;

            Phonebook.Init(settings.SqlConnectionString);
            progress.Value++;

            TourStates.Init(settings.SqlConnectionString, culture);
            progress.Value++;

            TourCostConstraintTypes.Init(settings.SqlConnectionString, culture);
            progress.Value++;

            Tours.Init(settings.SqlConnectionString);
            progress.Value++;

            ServiceTypes.Init(settings.SqlConnectionString, culture);
            progress.Value++;

            MailEventTypes.Init(settings.SqlConnectionString, culture);
            progress.Value++;

            TourRuleConstraints.Init(settings.SqlConnectionString);
            progress.Value++;

            TourCostRules.Init(settings.SqlConnectionString);
            progress.Value++;

            TourCostGroups.Init(settings.SqlConnectionString);
            progress.Value++;

            TourGroupServiceCosts.Init(settings.SqlConnectionString);
            progress.Value++;

            TourGroupServicePayments.Init(settings.SqlConnectionString);
            progress.Value++;

            TourGroupMembers.Init(settings.SqlConnectionString);
            progress.Value++;

            TourGroupEmployees.Init(settings.SqlConnectionString);
            progress.Value++;

            TourGroups.Init(settings.SqlConnectionString);
            progress.Value++;

            Services.Init(settings.SqlConnectionString);
            progress.Value++;

            TourGroupServices.Init(settings.SqlConnectionString);
            progress.Value++;

            Mails.Init(settings.SqlConnectionString);
            progress.Value++;

            // Note: please fix # of progress jobs if you added
            // anything else here.
        }
예제 #2
0
        public static void Init(string sqlConnectionString, Entities.Culture culture)
        {
            repo = new Repository.Sql.Types(sqlConnectionString);

            LoadAll(culture);
        }