Esempio n. 1
0
            public static WellLogInterval Latest()
            {
                List <WellLogInterval> w = WellLogIntervalcollection.Find(s => (s._id != null && s.Complete == false)).SortByDescending(s => s._id).Limit(1).ToListAsync().Result;

                if (w.Count > 0)
                {
                    return(w[0]);
                }
                else
                {
                    return(null);
                }
            }
Esempio n. 2
0
            public static WellLogInterval fromTime(System.DateTime t)
            {
                List <WellLogInterval> d = WellLogIntervalcollection.Find(s => (s._id != null && s.StartLog <= t && s.StopLog >= t)).SortByDescending(s => s._id).Limit(1).ToListAsync().Result;

                if (d.Count > 0)
                {
                    return(d[0]);
                }
                else
                {
                    return(null);
                }
            }
Esempio n. 3
0
            }                                 //'Allows for time machine


            public void Save()
            {
                WellLogIntervalcollection.InsertOne(this);
            }