示例#1
0
 public static SensorAT DuplicateSensor(SensorAT sensorAT, AT at)
 {
     var newSensorAT = new SensorAT();
     newSensorAT.SetName(at.GetName() + "-" + sensorAT.GetName());
     newSensorAT.SetCreationDate(new DateTime());
     newSensorAT.SetDeleted(false);
     newSensorAT.SetKm(sensorAT.GetKm());
     newSensorAT.SetLane(sensorAT.GetLane());
     newSensorAT.SetState(sensorAT.GetState());
     newSensorAT.SetStatus(true);
     newSensorAT.SetUpdateDate(new DateTime());
     newSensorAT.SetUser(sensorAT.GetUser());
     newSensorAT.SetWay(sensorAT.GetWay());
     newSensorAT.SetAt(at);
     return newSensorAT;
 }
示例#2
0
 public static SensorAT CreateSensor(User user, AT at, int index)
 {
     var newSensorAT = new SensorAT();
     newSensorAT.SetName(at.GetName() + "-" + index);
     newSensorAT.SetCreationDate(new DateTime());
     newSensorAT.SetDeleted(false);
     newSensorAT.SetKm(Convert.ToSingle(105.7));
     newSensorAT.SetLane(index);
     newSensorAT.SetState(1);
     newSensorAT.SetStatus(true);
     newSensorAT.SetUpdateDate(new DateTime());
     newSensorAT.SetUser(user);
     newSensorAT.SetWay(1);
     newSensorAT.SetAt(at);
     return newSensorAT;
 }
示例#3
0
        public static SensorAT DuplicateSensor(SensorAT sensorAT, AT at)
        {
            var newSensorAT = new SensorAT();

            newSensorAT.SetName(at.GetName() + "-" + sensorAT.GetName());
            newSensorAT.SetCreationDate(new DateTime());
            newSensorAT.SetDeleted(false);
            newSensorAT.SetKm(sensorAT.GetKm());
            newSensorAT.SetLane(sensorAT.GetLane());
            newSensorAT.SetState(sensorAT.GetState());
            newSensorAT.SetStatus(true);
            newSensorAT.SetUpdateDate(new DateTime());
            newSensorAT.SetUser(sensorAT.GetUser());
            newSensorAT.SetWay(sensorAT.GetWay());
            newSensorAT.SetAt(at);
            return(newSensorAT);
        }
示例#4
0
        public static SensorAT CreateSensor(User user, AT at, int index)
        {
            var newSensorAT = new SensorAT();

            newSensorAT.SetName(at.GetName() + "-" + index);
            newSensorAT.SetCreationDate(new DateTime());
            newSensorAT.SetDeleted(false);
            newSensorAT.SetKm(Convert.ToSingle(105.7));
            newSensorAT.SetLane(index);
            newSensorAT.SetState(1);
            newSensorAT.SetStatus(true);
            newSensorAT.SetUpdateDate(new DateTime());
            newSensorAT.SetUser(user);
            newSensorAT.SetWay(1);
            newSensorAT.SetAt(at);
            return(newSensorAT);
        }