internal string CreateNewScenario(string newScenarioName, int countryId)
        {
            var scenarioExists = CheckScenarioExists(newScenarioName);

            if (scenarioExists != string.Empty)
            {
                return(scenarioExists);
            }

            var scenario = new MaxFleetFactorScenario
            {
                ScenarioName = newScenarioName,
                CountryId    = countryId
            };

            CreateScenario(scenario);

            return(string.Empty);
        }
        internal string CloneExistingScenario(int existingScenarioId, string newScenarioName, int countryId)
        {
            var scenarioExists = CheckScenarioExists(newScenarioName);

            if (scenarioExists != string.Empty)
            {
                return(scenarioExists);
            }

            var scenario = new MaxFleetFactorScenario
            {
                ScenarioName = newScenarioName,
                CountryId    = countryId
            };

            CreateScenario(scenario);

            var newScenarioId = scenario.MaxFleetFactorScenarioId;

            DataContext.DuplicateMaxFleet(newScenarioId, existingScenarioId);

            return(string.Empty);
        }
 private void CreateScenario(MaxFleetFactorScenario scenarioToCreate)
 {
     DataContext.MaxFleetFactorScenarios.InsertOnSubmit(scenarioToCreate);
     DataContext.SubmitChanges();
 }