Ejemplo n.º 1
0
        public string PutLog(int logtype, string deviceName, string zoneName)
        {
            try
            {
                tblDemoBeacon beaconObj = new tblDemoBeacon();
                beaconObj.DeviceName = deviceName;
                beaconObj.ZoneName = zoneName;
                beaconObj.LogTime = DateTime.Now;
                beaconObj.Type = logtype;
                TwitRapDBEntities context = new TwitRapDBEntities();
                context.tblDemoBeacons.Add(beaconObj);
                context.SaveChanges();
                return "true";
            }
            catch (Exception ex )
            {

                return "Error in application: " + ex;
            }
        }