public IObjects Create(IDBWellLocations dbwl) { if (dbwl == null) { return(null); } IObjects res = new IObjects(); foreach (IDBWellLocation item in dbwl) { WellLocation wl = new WellLocation(); wl.WellNum = item.Name; wl.WellNum = item.Name; wl.X = item.x; wl.Y = item.y; wl.WellCategory = (WellCategory)(item.WellCategory); if (item.WellType == "W") { wl.WellType = WellType.W; } else if (item.WellType == "Y") { wl.WellType = WellType.Y; } res.Add(wl); } return(res); }
public IObjects Create(IDBWell db) { if (db == null) { return(null); } IObjects res = new IObjects(); Well well = new Well() { Name = db.Name }; well.Depths = new Utility.ObsDoubles(db.Depths); //for (int i = 0; i < db.Columns.Count; i++)//暂时为了演示效果,只显示两条曲线 2017-3-14 for (int i = 0; i < 2; i++) { string name = db.Columns[i].Item1; WellColumn c = new WellColumn() { Name = db.Columns[i].Item1, Owner = well, MathType = Enums.MathType.DEFAULT }; c.Values = new Utility.ObsDoubles(db.Columns[i].Item2); well.Columns.Add(c); } res.Add(well); return(res); }