Пример #1
0
        /**
         * WellTest
         */

        public static List <WellTests> ObjectToWellTestList(dynamic newWellTests, int dailyReportTotalId)
        {
            List <WellTests> wellTestList = new List <WellTests>();

            foreach (dynamic newWellTest in newWellTests)
            {
                WellTests wellTest = ObjectToWellTest(newWellTest, dailyReportTotalId);
                wellTestList.Add(wellTest);
            }

            return(wellTestList);
        }
Пример #2
0
        private static WellTests ObjectToWellTest(dynamic newWellTest, int dailyReportTotalId)
        {
            WellTests wellTest = new WellTests();

            wellTest.DailyreportId     = dailyReportTotalId;
            wellTest.WellName          = Convert.ToString(newWellTest.well_name);
            wellTest.TestDate          = Convert.ToDateTime(newWellTest.test_date);
            wellTest.OnlineTime        = convertToDecimal(newWellTest.online_time);
            wellTest.ChokeOpening      = convertToDecimal(newWellTest.choke_opening);
            wellTest.OilProdRate       = convertToDecimal(newWellTest.oil_prod_rate);
            wellTest.GasProdRate       = convertToDecimal(newWellTest.gas_prod_rate);
            wellTest.WaterProdRate     = convertToDecimal(newWellTest.water_prod_rate);
            wellTest.Whp               = convertToDecimal(newWellTest.WHP);
            wellTest.Wht               = convertToDecimal(newWellTest.WHT);
            wellTest.Bhp               = convertToDecimal(newWellTest.BHP);
            wellTest.Bht               = convertToDecimal(newWellTest.BHT);
            wellTest.SeparatorPressure = convertToDecimal(newWellTest.seperator_pressure);
            wellTest.Bsw               = convertToDecimal(newWellTest.BSW);
            wellTest.Gor               = convertToDecimal(newWellTest.GOR);
            wellTest.SandProd          = convertToDecimal(newWellTest.sand_prod);
            wellTest.Glr               = convertToDecimal(newWellTest.GLR);

            return(wellTest);
        }