示例#1
0
        public void SeriesMtableInsertEndPoint()
        {
            var hdbProcessor = new HdbApi.App_Code.HdbCommands();
            var result       = hdbProcessor.modify_m_table_raw(conx, testMRID, Convert.ToInt16(testSDI), testT, testVal, testInterval, testBool);

            var seriesProcessor = new DataAccessLayer.SeriesRepository();
            var verification    = seriesProcessor.GetSeries(conx, testSDI, testInterval, testT, testT, "M", testMRID);

            Assert.AreEqual(testVal.ToString(), verification.data[0].value);
            hdbProcessor.delete_from_hdb(conx, Convert.ToInt16(testSDI), testT, testInterval, testMRID);
        }
示例#2
0
        public IHttpActionResult Post([FromBody] List <Models.PointModel.ModeledPoint> input)
        {
            IDbConnection db = HdbController.Connect(this.Request.Headers);

            var hdbProcessor = new HdbApi.App_Code.HdbCommands();

            foreach (Models.PointModel.ModeledPoint point in input)
            {
                var result = hdbProcessor.modify_m_table_raw(db, point.model_run_id, point.site_datatype_id, point.start_date_time, point.value, point.interval, point.do_update_y_or_n);
            }

            try
            {
                db.Close();
                db.Dispose();
            }
            catch
            {
            }

            return(Ok(input));
        }