예제 #1
0
        /// <summary>
        /// Install a New Agency
        /// </summary>
        /// <param name="implementation">The "State" Implementation relevant to the Agency.</param>
        /// <param name="name">Name of the Agency</param>
        /// <param name="ori">Federal Identifier for the Agency</param>
        /// <param name="classicRmsConnectionString">Connection string to the Classic RMS Database.</param>
        public static Guid Create(string implementation, string name, string ori, string classicRmsConnectionString)
        {
            Log.Info("Creating Agency: " + name + " - " + ori);
            Log.Info(Program.LineBreak);

            // Create a new Agency.
            var agencyId = CreateAgency(name, ori);

            // Create the Agency's Classic Integration Role
            ClassicIntegrationRole.Setup(agencyId);

            // Create the Default Workflow
            DefaultWorkflow.CreateInAgency(agencyId);

            // Install the TriTech Default Templates
            TriTechDefaultTemplates.Install(agencyId);

            // Install the Implementation Templates
            ImplementationTemplates.Install(agencyId, implementation);

            // Import Codes From Classic RMS
            SystemCodes.UpdateAgencyCodes(agencyId, classicRmsConnectionString);
            VehicleCodes.ImportIntoAgency(agencyId, classicRmsConnectionString);
            AgencyViolationCodes.ImportAgencyViolationCodes(agencyId, classicRmsConnectionString);
            AgencySystemConfigGlobal.UpdateAgencySettings(agencyId, classicRmsConnectionString);

            // Configuration
            AgencyDefaults.Apply(agencyId);

            return(agencyId);
        }
예제 #2
0
 /// <summary>
 /// Update all "Agency" codes from classic rms.
 /// </summary>
 public static void UpdateAllAgencies(string classicRmsConnectionString)
 {
     AgencyViolationCodes.UpdateAllAgencies(classicRmsConnectionString);
     SystemCodes.UpdateAllAgencies(classicRmsConnectionString);
     VehicleCodes.ImportIntoAllAgencies(classicRmsConnectionString);
     AgencySystemConfigGlobal.UpdateAllAgencies(classicRmsConnectionString);
 }
예제 #3
0
 public ActionResult ReloadConfig()
 {
     if (Request.IsLocal)
     {
         AppConfig.ReloadCurrent();
         SqlData.ReloadCurrent();
         UISettings.Reload();
         LangTexts.Reload();
         SystemCodes.Reload();
         return(Content("刷新成功"));
     }
     else
     {
         return(Content("非法链接"));
     }
 }
예제 #4
0
 private void btnLoad_Click(object sender, RoutedEventArgs e)
 {
     SystemCodes.Reload();
     this.DataContext      = SystemCodes.Current;
     listItems.ItemsSource = SystemCodes.Current.Items;
 }