Example #1
0
        /* == Start Insert Tracker Logs == */
        public int Insert_Tracker(string Filter, string TrackerID, double Latitude, double Longitude, double Speed, double Odometer, double Direction, string Rotation, double Altitude, string TrackerStream, string GPSSignalStatus, DateTime UTCTimeAndDate, FM_Tracker_InputOutputStatus ParameterObject, bool IsOfflineData, string DeviceState, string ExtendState, string Address, double FuelConsumedPercentage, double CurrentTripFuelConsumed, double Temperature, double CurrentTripMileage, string GSMSignal, int TripNO)
        {
            SqlCommand loCommand = DataContext.OpenConnection();

            try
            {
                loCommand = DataContext.SetStoredProcedure(loCommand, "FM_ManageVehicleTracking");
                loCommand = DataContext.StartTransaction(loCommand);
                bool result = DataContext.ExecuteNonQuery(DataContext.AddParameters(loCommand, "@Filter", Filter, "@IMEI", TrackerID, "@Latitude", Latitude, "@Longitude", Longitude, "@Speed", Speed, "@Odometer", Odometer, "@Direction", Direction, "@Rotation", Rotation, "@Altitude", Altitude, "@TrackerStream", TrackerStream, "@GPSSignalStatus", GPSSignalStatus, "@UTCTimeAndDate", UTCTimeAndDate, "@OutLockthedoor", ParameterObject.OutLockthedoor, "@OutSirenSound", ParameterObject.OutSirenSound, "@OutUnlockthedoor", ParameterObject.OutUnlockthedoor, "@OutRelyToStopCar", ParameterObject.OutRelyToStopCar, "@InSOS", ParameterObject.InSOS, "@InAntiTemper", ParameterObject.InAntiTemper, "@InDoorOpenClose", ParameterObject.InDoorOpenClose, "@InUnlockDoor", ParameterObject.InUnlockDoor, "@InEngineOnOff", ParameterObject.InEngineOnOff, "@IsOfflineData", IsOfflineData, "@DeviceState", DeviceState, "@ExtendState", ExtendState, "@Address", Address, "@FuelLiter", CurrentTripFuelConsumed, "@FuelPercent", FuelConsumedPercentage, "@Temperature", Temperature, "@CurrentTripMileage", CurrentTripMileage, "@GSMSignal", GSMSignal, "@TripName", TripNO.ToString()));
                DataContext.EndTransaction(loCommand);
                return(Convert.ToInt32(result));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                DataContext.CloseConnection(loCommand);
            }
        }
Example #2
0
 /* == Start Insert Tracker Logs == */
 public int Insert_Tracker(string Filter, string TrackerID, double Latitude, double Longitude, double Speed, double Odometer, double Direction, string Rotation, double Altitude, string TrackerStream, string GPSSignalStatus, DateTime UTCTimeAndDate, FM_Tracker_InputOutputStatus ParameterObject, bool IsOfflineData, string DeviceState, string ExtendState, string Address, double FuelConsumedPercentage, double CurrentTripFuelConsumed, double Temperature, double CurrentTripMileage, string GSMSignal, int TripNO)
 {
     try
     {
         return(model.Insert_Tracker(Filter, TrackerID, Latitude, Longitude, Speed, Odometer, Direction, Rotation, Altitude, TrackerStream, GPSSignalStatus, UTCTimeAndDate, ParameterObject, IsOfflineData, DeviceState, ExtendState, Address, FuelConsumedPercentage, CurrentTripFuelConsumed, Temperature, CurrentTripMileage, GSMSignal, TripNO));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }