private bool CreateRuleTrend(string fileName, int seriesId)
 {
     lock (createRuleTrends)
     {
         try
         {
             var list  = ModelGenerate.GenerateRuleTrends(seriesId);
             var rules = new RuleTrendsService();
             if (list != null)
             {
                 for (int i = 0; i < list.Count; ++i)
                 {
                     rules.InsertElement(new RuleTrendBindingModel
                     {
                         SeriesId         = seriesId,
                         FuzzyTrendName   = Converter.ToFuzzyTrendLabel(list[i].FuzzyTrendName),
                         FuzzyTrendId     = Convert.ToInt32(list[i].FuzzyTrendId),
                         FuzzyLabelFromId = Convert.ToInt32(list[i].FuzzyLabelFromId),
                         FuzzyLabelToId   = Convert.ToInt32(list[i].FuzzyLabelToId)
                     });
                 }
                 return(true);
             }
             else
             {
                 throw new Exception("Не получен список правил");
             }
         }
         catch (Exception ex)
         {
             throw new Exception(string.Format("CreateRuleTrend {0}: {1}", fileName, ex.Message));
         }
     }
 }
 private bool GenerateSituationsByFuzzy(string fileName, int seriesId)
 {
     lock (genSituationsByFuzzy)
     {
         try
         {
             ModelGenerate.GenerateSituationsByFuzzy(seriesId);
             return(true);
         }
         catch (Exception ex)
         {
             throw new Exception(string.Format("GenerateSituationsByFuzzy {0}: {1}", fileName, ex.Message));
         }
     }
 }
 private bool CreateFuzzyTrend(string fileName, int seriesId)
 {
     lock (createFuzzyTrends)
     {
         try
         {
             ModelGenerate.GenerateFuzzyTrends(seriesId);
             return(true);
         }
         catch (Exception ex)
         {
             throw new Exception(string.Format("CreateFuzzyTrend {0}: {1}", fileName, ex.Message));
         }
     }
 }
 private bool CreatePointTrend(string fileName, int seriesId)
 {
     lock (createPointTrends)
     {
         try
         {
             return(ModelGenerate.CalcPointsTrend(new PointTrendCalcBindingModel
             {
                 FileName = fileName,
                 TypeFile = TypeFile.Текстовый,
                 DatasInFile = new List <TypeDataInFile> {
                     TypeDataInFile.ЧисловоеЗначение
                 },
                 SeriesDiscriptionId = seriesId
             }));;
         }
         catch (Exception ex)
         {
             throw new Exception(string.Format("CreatePointTrend {0}: {1}", fileName, ex.Message));
         }
     }
 }