Beispiel #1
0
        public List <Chronozoom.Entities.Threshold> GetThresholds()
        {
            var Thresholds = DataEnvironmentAccess.AnInstance.GetIThresholdView();
            var tholds     = new List <Chronozoom.Entities.Threshold>();

            foreach (var threshold in Thresholds)
            {
                try
                {
                    Chronozoom.Entities.Threshold th = new Chronozoom.Entities.Threshold(threshold.Threshold,
                                                                                         threshold.Timeunit,
                                                                                         threshold.ThresholdDate.HasValue == true ? threshold.ThresholdDate.Value.Day : 0,
                                                                                         threshold.ThresholdDate.HasValue == true ? threshold.ThresholdDate.Value.Month : 0,
                                                                                         threshold.ThresholdYear,
                                                                                         threshold.ShortDescription,
                                                                                         (!string.IsNullOrEmpty(threshold.URL) && threshold.URL.IndexOf('#') > 0)  ? threshold.URL.Substring(threshold.URL.IndexOf('#') + 1): string.Empty
                                                                                         );
                    tholds.Add(th);
                }
                catch
                {
                    //error
                }
            }
            return(tholds);
        }
Beispiel #2
0
 public List<Chronozoom.Entities.Threshold> GetThresholds()
 {
     var Thresholds = DataEnvironmentAccess.AnInstance.GetIThresholdView();
     var tholds = new List<Chronozoom.Entities.Threshold>();
     foreach (var threshold in Thresholds)
     {
         try
         {
             Chronozoom.Entities.Threshold th = new Chronozoom.Entities.Threshold(threshold.Threshold,
                 threshold.Timeunit,
                 threshold.ThresholdDate.HasValue == true ? threshold.ThresholdDate.Value.Day : 0,
                 threshold.ThresholdDate.HasValue == true ? threshold.ThresholdDate.Value.Month : 0,
                 threshold.ThresholdYear,
                 threshold.ShortDescription,
                 (!string.IsNullOrEmpty(threshold.URL) && threshold.URL.IndexOf('#') >0)  ? threshold.URL.Substring(threshold.URL.IndexOf('#')+1): string.Empty
                 );
             tholds.Add(th);
         }
         catch
         {
             //error
         }
     }
     return tholds;
 }