Class RegistrationPlateManager
Contains the simplic logistics equipment manager to work with simplic vehicle
Inheritance
Inherited Members
Namespace: Simplic.PlugIn.Logistics
Assembly: Simplic.PlugIn.Logistics.dll
Syntax
public class RegistrationPlateManager
Properties
| Improve this Doc View SourceSingleton
Gets the singleton access to the vehicle manager
Declaration
public static RegistrationPlateManager Singleton { get; }
Property Value
Type | Description |
---|---|
RegistrationPlateManager |
Methods
| Improve this Doc View SourceAddNewRegistrationPlate(String)
Adds a new registration plate with a given identifier to the database and returns the saved plate
Declaration
public RegistrationPlate AddNewRegistrationPlate(string registrationIdentifier)
Parameters
Type | Name | Description |
---|---|---|
System.String | registrationIdentifier | The registration identifier for the new plate |
Returns
Type | Description |
---|---|
RegistrationPlate | The newly created registration plate |
Delete(VehicleRegistrationPlate, SAConnection)
Remove an VehicleRegistrationPlate from the database by setting IsDeleted of the connected RegistrationPlate to true and setting the ValidUntil date to the current date if there is no value set in the passed instance
Declaration
public void Delete(VehicleRegistrationPlate vehicleRegistrationPlate, SAConnection connection)
Parameters
Type | Name | Description |
---|---|---|
VehicleRegistrationPlate | vehicleRegistrationPlate | VehicleRegistrationPlate to remove |
SAConnection | connection |
DoesPlateExist(String)
Checks if a registration plate with a given identifier already exists in the database
Declaration
public bool DoesPlateExist(string registrationIdentifier)
Parameters
Type | Name | Description |
---|---|---|
System.String | registrationIdentifier | The identifier to check for existance in the database |
Returns
Type | Description |
---|---|
System.Boolean | True if the plate already exists, false otherwise. |
GetAllVehicleRegistrationPlatesByVehicleGuid(Guid, SAConnection, Boolean)
Gets all VehicleRegistrationPlates of a given vehicle
Declaration
public IList<VehicleRegistrationPlate> GetAllVehicleRegistrationPlatesByVehicleGuid(Guid vehicleGuid, SAConnection connection, bool allowUnconnected = false)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | vehicleGuid | unique identifier of the vehicle |
SAConnection | connection | connection to use for communication with the database |
System.Boolean | allowUnconnected |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<VehicleRegistrationPlate> | The list of VehicleRegistrationPlates of the vehicle with the given id |
GetLatestVehicleRegistrationPlateByRegistrationPlateGuid(Guid, SAConnection, Boolean)
Get the latest VehicleRegistrationPlate with a given registration plate id from the database
Declaration
public VehicleRegistrationPlate GetLatestVehicleRegistrationPlateByRegistrationPlateGuid(Guid registrationPlateGuid, SAConnection connection, bool allowUnconnected = false)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | registrationPlateGuid | Id of the registration plate |
SAConnection | connection | connection to use for communication with the database |
System.Boolean | allowUnconnected | if true, plates that have a ValidUntil date (hence are no longer connected with that plate) can be found |
Returns
Type | Description |
---|---|
VehicleRegistrationPlate | If a VehicleRegistrationPlate was found, an instance of it will be returned, else null |
GetLatestVehicleRegistrationPlateByRegistrationPlateGuid(Guid, Boolean)
See Simplic.PlugIn.Logistics.RegistrationPlateManager.GetLatestVehicleRegistrationPlate(System.String,System.Guid,SAConnection)
Declaration
public VehicleRegistrationPlate GetLatestVehicleRegistrationPlateByRegistrationPlateGuid(Guid registrationPlateGuid, bool allowUnconnected = false)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | registrationPlateGuid | |
System.Boolean | allowUnconnected |
Returns
Type | Description |
---|---|
VehicleRegistrationPlate |
GetLatestVehicleRegistrationPlateByVehicleGuid(Guid)
See Simplic.PlugIn.Logistics.RegistrationPlateManager.GetLatestVehicleRegistrationPlate(System.String,System.Guid,SAConnection)
Declaration
public VehicleRegistrationPlate GetLatestVehicleRegistrationPlateByVehicleGuid(Guid vehicleGuid)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | vehicleGuid |
Returns
Type | Description |
---|---|
VehicleRegistrationPlate |
GetLatestVehicleRegistrationPlateByVehicleGuid(Guid, SAConnection, Boolean)
Get the latest VehicleRegistrationPlate with a given vehicle id from the database
Declaration
public VehicleRegistrationPlate GetLatestVehicleRegistrationPlateByVehicleGuid(Guid vehicleGuid, SAConnection connection, bool allowUnconnected = false)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | vehicleGuid | Id of the vehicle |
SAConnection | connection | connection to use for communication with the database |
System.Boolean | allowUnconnected | if true, plates that have a ValidUntil date (hence are no longer connected with that plate) can be found |
Returns
Type | Description |
---|---|
VehicleRegistrationPlate | If an VehicleRegistrationPlate was found, an instance of it will be returned, else null |
GetNewRegistrationPlate()
Get a new RegistrationPlate instance
Declaration
public RegistrationPlate GetNewRegistrationPlate()
Returns
Type | Description |
---|---|
RegistrationPlate | A new RegistrationPlate instance |
GetNewVehicleRegistrationPlate()
Get a new VehicleRegistrationPlate instance
Declaration
public VehicleRegistrationPlate GetNewVehicleRegistrationPlate()
Returns
Type | Description |
---|---|
VehicleRegistrationPlate | A new VehicleRegistrationPlate instance |
GetPlateByRegistrationIdentifier(String)
Checks if a registration plate with a given identifier already exists in the database and returns it if so
Declaration
public RegistrationPlate GetPlateByRegistrationIdentifier(string registrationIdentifier)
Parameters
Type | Name | Description |
---|---|---|
System.String | registrationIdentifier | The identifier to check for existance in the database |
Returns
Type | Description |
---|---|
RegistrationPlate | The plate with this RegistrationIdentifier |
GetRegistrationPlate(Guid)
Declaration
public RegistrationPlate GetRegistrationPlate(Guid registrationPlateGuid)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | registrationPlateGuid |
Returns
Type | Description |
---|---|
RegistrationPlate |
GetRegistrationPlate(Guid, SAConnection)
Gets the RegistrationPlate with the given id from the database
Declaration
public RegistrationPlate GetRegistrationPlate(Guid registrationPlateGuid, SAConnection connection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | registrationPlateGuid | Id of the registration plate |
SAConnection | connection | connection to use for communication with the database |
Returns
Type | Description |
---|---|
RegistrationPlate | If a RegistrationPlate was found, an instance of it will be returned, else null |
Save(VehicleRegistrationPlate, SAConnection)
Create or save an VehicleRegistrationPlate in the database
Declaration
public void Save(VehicleRegistrationPlate vehicleRegistrationPlate, SAConnection connection)
Parameters
Type | Name | Description |
---|---|---|
VehicleRegistrationPlate | vehicleRegistrationPlate | VehicleRegistrationPlate instance |
SAConnection | connection | connection to use for communication with the database |
SaveRegistrationPlate(RegistrationPlate)
Declaration
public void SaveRegistrationPlate(RegistrationPlate registrationPlate)
Parameters
Type | Name | Description |
---|---|---|
RegistrationPlate | registrationPlate |
SaveRegistrationPlate(RegistrationPlate, SAConnection)
Save registration plate without assignment
Declaration
public void SaveRegistrationPlate(RegistrationPlate registrationPlate, SAConnection connection)
Parameters
Type | Name | Description |
---|---|---|
RegistrationPlate | registrationPlate | RegistrationPlate instance |
SAConnection | connection | connection to use for communication with the database |