Exemple #1
0
        public List <WellAllocation> GetAll(string uwi, DateTime start, DateTime end)
        {
            List <WellAllocation> allocations = new List <WellAllocation>();
            WebImporterWrapper    wi          = new WebImporterWrapper(dcInfo);

            try
            {
                DataTable dt;
                if (frequency == Frequency.Daily)
                {
                    dt = wi.LoadDailyProduction(uwi);
                }
                else
                {
                    dt = wi.LoadMonthlyProduction(uwi);
                }
                foreach (DataRow dr in dt.Rows)
                {
                    var w = this.WellAllocationFromRow(dr);
                    allocations.Add(w);
                }
            }
            catch (Exception e)
            {
                PetrelLogger.InfoOutputWindow("Failed to load wells: " + e.ToString());
            }
            return(allocations);
        }