예제 #1
0
 public static Curve2D GetScoreCurve2D(int Index, DateTime calcuDatetime)
 {
     try
     {
         Curve2D        scorecurve2d  = new Curve2D();
         List <Curve2D> scorecurves2d = _instance.ScoreCurves2D.FindAll(delegate(Curve2D a) { return(a.Index == Index && a.validDate <= calcuDatetime); });
         if (scorecurves2d != null && scorecurves2d.Count != 0)
         {
             scorecurve2d = scorecurves2d.OrderByDescending(a => a.validDate).First();
             //scorecurve2d = scorecurves2d[scorecurves2d.Count - 1];
             return(scorecurve2d);
         }
         else
         {
             return(null);
         }
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
예제 #2
0
 public static Curve2D GetOPXCurve2D(int Index, DateTime calcuDatetime)
 {
     try
     {
         Curve2D        opxcurve2d  = new Curve2D();
         List <Curve2D> opxcurves2d = _instance.OPXCurves2D.FindAll(delegate(Curve2D a) { return(a.Index == Index && a.validDate <= calcuDatetime); });
         if (opxcurves2d != null && opxcurves2d.Count != 0)
         {
             opxcurve2d = opxcurves2d.OrderByDescending(a => a.validDate).First();
             //opxcurve2d = opxcurves2d[opxcurves2d.Count - 1];
             return(opxcurve2d);
         }
         else
         {
             return(null);
         }
     }
     catch
     {
         return(null);
     }
 }