Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
 public static AT DuplicateAT(AT at, int index)
 {
     var newAt = new AT();
     newAt.SetName(at.GetName() + "-" + index);
     newAt.SetConstructor(at.GetConstructor());
     newAt.SetCreationDate(new DateTime());
     newAt.SetDeleted(false);
     newAt.SetIpAddress(at.GetIpAddress());
     newAt.SetPhysicalAddress(at.GetPhysicalAddress());
     newAt.SetPort(at.GetPort());
     newAt.SetStatus(true);
     newAt.SetType(at.GetType());
     newAt.SetUpdateDate(new DateTime());
     newAt.SetUser(at.GetUser());
     return newAt;
 }
Ejemplo n.º 3
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;
 }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
0
        public static AT DuplicateAT(AT at, int index)
        {
            var newAt = new AT();

            newAt.SetName(at.GetName() + "-" + index);
            newAt.SetConstructor(at.GetConstructor());
            newAt.SetCreationDate(new DateTime());
            newAt.SetDeleted(false);
            newAt.SetIpAddress(at.GetIpAddress());
            newAt.SetPhysicalAddress(at.GetPhysicalAddress());
            newAt.SetPort(at.GetPort());
            newAt.SetStatus(true);
            newAt.SetType(at.GetType());
            newAt.SetUpdateDate(new DateTime());
            newAt.SetUser(at.GetUser());
            return(newAt);
        }
Ejemplo n.º 6
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);
        }