示例#1
0
        private List <DataPointDefinition> GetDataPointDefinitions(int cpeDefId)
        {
            var cpe_DevEntities = new cpe_devEntities();
            var dataset         = from dataPoint in cpe_DevEntities.DataPointDefinitions
                                  where dataPoint.CpeDefinitionId == cpeDefId
                                  select dataPoint;

            return(dataset.ToList());
        }
示例#2
0
        public Boolean Insert(List <CpeEntryDataPointValue> cpeEntryDataPointValues)
        {
            bool            success = true;
            cpe_devEntities db      = new cpe_devEntities();

            foreach (var cpeEntryDataPintValue in cpeEntryDataPointValues)
            {
                db.CpeEntryDataPointValues.Add(cpeEntryDataPintValue);
            }
            try
            {
                db.SaveChanges();
            }
            catch (Exception e)
            {
                success = false;
            }

            return(success);
        }