|
@@ -39,8 +39,8 @@ namespace EVCB_OCPP.WSServer.Helper
|
|
|
|
|
|
public static void AddInsertMeterValueRecordSqlParameters(this List<SqlParameter> sqlParameters,
|
|
|
string chargeBoxId, byte connectorId, decimal value, DateTime createdOn
|
|
|
- ,int contextId, int formatId, int measurandId, int phaseId
|
|
|
- ,int locationId,int unitId,int transactionId)
|
|
|
+ , int contextId, int formatId, int measurandId, int phaseId
|
|
|
+ , int locationId, int unitId, int transactionId)
|
|
|
{
|
|
|
List<SqlParameter> parameter = new List<SqlParameter>
|
|
|
{
|
|
@@ -56,28 +56,26 @@ namespace EVCB_OCPP.WSServer.Helper
|
|
|
new SqlParameter("UnitId", SqlDbType.Int) { Value = unitId },
|
|
|
new SqlParameter("TransactionId", SqlDbType.Int) { Value = transactionId },
|
|
|
};
|
|
|
- sqlParameters.AddRange(parameter);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public static void AddInsertConnectorStatusRecordSqlParameters(this List<SqlParameter> sqlParameters,
|
|
|
- string chargeBoxId, byte connectorId, int status, DateTime createdOn
|
|
|
- , string errorInfo, string vendorId, string vendorErrorCode, int chargePointErrorCodeId)
|
|
|
- {
|
|
|
- List<SqlParameter> parameter = new List<SqlParameter>
|
|
|
- {
|
|
|
- new SqlParameter("ChargeBoxId", SqlDbType.NVarChar, 50){ Value = chargeBoxId },
|
|
|
- new SqlParameter("ConnectorId", SqlDbType.TinyInt) { Value = connectorId },
|
|
|
- new SqlParameter("Status", SqlDbType.Int){ Value = status },
|
|
|
- new SqlParameter("CreatedOn", SqlDbType.DateTime) { Value = createdOn },
|
|
|
- new SqlParameter("ChargePointErrorCodeId", SqlDbType.Int) { Value = chargePointErrorCodeId },
|
|
|
- new SqlParameter("ErrorInfo",SqlDbType.NVarChar, 50){ Value = errorInfo },
|
|
|
- new SqlParameter("VendorId", SqlDbType.NVarChar, 255){ Value = vendorId },
|
|
|
- new SqlParameter("VendorErrorCode", SqlDbType.NVarChar, 100) {Value =vendorErrorCode },
|
|
|
-
|
|
|
-
|
|
|
- };
|
|
|
- sqlParameters.AddRange(parameter);
|
|
|
- }
|
|
|
- }
|
|
|
+ sqlParameters.AddRange(parameter);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public static void AddInsertConnectorStatusRecordSqlParameters(this List<SqlParameter> sqlParameters,
|
|
|
+ string chargeBoxId, byte connectorId, int status, DateTime createdOn
|
|
|
+ , string errorInfo, string vendorId, string vendorErrorCode, int chargePointErrorCodeId)
|
|
|
+ {
|
|
|
+ List<SqlParameter> parameter = new List<SqlParameter>
|
|
|
+ {
|
|
|
+ new SqlParameter("ChargeBoxId", SqlDbType.NVarChar, 50){ Value = chargeBoxId },
|
|
|
+ new SqlParameter("ConnectorId", SqlDbType.TinyInt) { Value = connectorId },
|
|
|
+ new SqlParameter("Status", SqlDbType.Int){ Value = status },
|
|
|
+ new SqlParameter("CreatedOn", SqlDbType.DateTime) { Value = createdOn },
|
|
|
+ new SqlParameter("ChargePointErrorCodeId", SqlDbType.Int) { Value = chargePointErrorCodeId },
|
|
|
+ new SqlParameter("ErrorInfo",SqlDbType.NVarChar, 50){ Value = errorInfo is null ? DBNull.Value : errorInfo },
|
|
|
+ new SqlParameter("VendorId", SqlDbType.NVarChar, 255){ Value = vendorId },
|
|
|
+ new SqlParameter("VendorErrorCode", SqlDbType.NVarChar, 100) {Value =vendorErrorCode },
|
|
|
+ };
|
|
|
+ sqlParameters.AddRange(parameter);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|