|
@@ -31,26 +31,19 @@ namespace EVCB_OCPP.TaskScheduler.Jobs
|
|
using (var dbConn = new SqlConnection(mainDBConnectString))
|
|
using (var dbConn = new SqlConnection(mainDBConnectString))
|
|
{
|
|
{
|
|
dbConn.Open();
|
|
dbConn.Open();
|
|
- try
|
|
|
|
- {
|
|
|
|
- var parameters = new DynamicParameters();
|
|
|
|
- parameters.Add("@SerialNo", Guid.NewGuid().ToString(), System.Data.DbType.String);
|
|
|
|
- parameters.Add("@OutAction", "Reset", System.Data.DbType.String);
|
|
|
|
- parameters.Add("@OutRequest", @"{""type"":""Hard""}", System.Data.DbType.String);
|
|
|
|
- parameters.Add("@InMessage", string.Empty, System.Data.DbType.String);
|
|
|
|
- parameters.Add("@CreatedOn", DateTime.UtcNow, System.Data.DbType.DateTime);
|
|
|
|
- parameters.Add("@ReceivedOn", DefaultSetting.DefaultNullTime, System.Data.DbType.DateTime);
|
|
|
|
- parameters.Add("@CreatedBy", "Task", System.Data.DbType.String);
|
|
|
|
- parameters.Add("@ChargeBoxId", charger, System.Data.DbType.String);
|
|
|
|
- parameters.Add("@UpdatedOn", DefaultSetting.DefaultNullTime, System.Data.DbType.DateTime);
|
|
|
|
|
|
+ var parameters = new DynamicParameters();
|
|
|
|
+ parameters.Add("@SerialNo", Guid.NewGuid().ToString(), System.Data.DbType.String);
|
|
|
|
+ parameters.Add("@OutAction", "Reset", System.Data.DbType.String);
|
|
|
|
+ parameters.Add("@OutRequest", @"{""type"":""Hard""}", System.Data.DbType.String);
|
|
|
|
+ parameters.Add("@InMessage", string.Empty, System.Data.DbType.String);
|
|
|
|
+ parameters.Add("@CreatedOn", DateTime.UtcNow, System.Data.DbType.DateTime);
|
|
|
|
+ parameters.Add("@ReceivedOn", DefaultSetting.DefaultNullTime, System.Data.DbType.DateTime);
|
|
|
|
+ parameters.Add("@CreatedBy", "Task", System.Data.DbType.String);
|
|
|
|
+ parameters.Add("@ChargeBoxId", charger, System.Data.DbType.String);
|
|
|
|
+ parameters.Add("@UpdatedOn", DefaultSetting.DefaultNullTime, System.Data.DbType.DateTime);
|
|
|
|
|
|
- await dbConn.ExecuteAsync(sqlString, parameters);
|
|
|
|
- }
|
|
|
|
- catch(Exception ex)
|
|
|
|
- {
|
|
|
|
|
|
+ await dbConn.ExecuteAsync(sqlString, parameters);
|
|
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|