diff --git a/SolarPower/Controllers/PowerStationController.cs b/SolarPower/Controllers/PowerStationController.cs index 1f78cb9..e9dca8a 100644 --- a/SolarPower/Controllers/PowerStationController.cs +++ b/SolarPower/Controllers/PowerStationController.cs @@ -987,7 +987,7 @@ namespace SolarPower.Controllers Brand = Device.Brand, ColName = Device.ColName, PowerStationId = Device.PowerStationId, - DBName = Device.DBName, + DBName = powerStation.SiteDB, Id = Device.Id, Name = Device.Name, ProductModel = Device.ProductModel, @@ -1035,7 +1035,7 @@ namespace SolarPower.Controllers Brand = Device.Brand, ColName = Device.ColName, PowerStationId = Device.PowerStationId, - DBName = Device.DBName, + DBName = powerStation.SiteDB, Id = Device.Id, Name = Device.Name, ProductModel = Device.ProductModel, diff --git a/SolarPower/Properties/launchSettings.json b/SolarPower/Properties/launchSettings.json index 059bea0..5ef5dfe 100644 --- a/SolarPower/Properties/launchSettings.json +++ b/SolarPower/Properties/launchSettings.json @@ -24,7 +24,8 @@ "commandName": "Project", "launchBrowser": true, "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" }, "applicationUrl": "https://localhost:5001;http://localhost:5000" } diff --git a/SolarPower/Views/PowerStation/PowerStationEdit.cshtml b/SolarPower/Views/PowerStation/PowerStationEdit.cshtml index efcca6b..8d9b906 100644 --- a/SolarPower/Views/PowerStation/PowerStationEdit.cshtml +++ b/SolarPower/Views/PowerStation/PowerStationEdit.cshtml @@ -2063,7 +2063,7 @@ TypeName: $("#Device_Type_modal :selected").text(), Brand: $("#Device_Brand_modal").val(), ProductModel: $("#Device_ProductModel_modal").val(), - DBName: $("#Device_DBName_modal").val(), + //DBName: $("#Device_DBName_modal").val(), TableName: $("#Device_TableName_modal").val(), ColName: $("#Device_ColName_modal").val(), InstallDate: $("#Device_InstallDate_modal").val(), @@ -2091,7 +2091,7 @@ //#region 取一筆設備 $('#Device_table').on("click", "button.edit-btn", function () { $("#Device-modal .modal-title").html("設備資料 - 編輯"); - + document.getElementById('Device_Status_modal').disabled = true; selected_id = $(this).parents('tr').attr('data-id'); //取得單一運維基本資料 @@ -2109,12 +2109,11 @@ return; } document.getElementById('Device_Type_modal').disabled = true; - document.getElementById('Device_Status_modal').disabled = false; document.getElementById('Device_Enabled_modal').disabled = false; $("#Device_Type_modal").val(rel.data.type); $("#Device_Brand_modal").val(rel.data.brand); $("#Device_ProductModel_modal").val(rel.data.productModel); - $("#Device_DBName_modal").val(rel.data.dbName); + //$("#Device_DBName_modal").val(rel.data.dbName); $("#Device_TableName_modal").val(rel.data.tableName); $("#Device_ColName_modal").val(rel.data.colName); $("#Device_Controller_modal").val(rel.data.controllerId); @@ -2133,7 +2132,7 @@ //#region 取一筆逆變器 $('#Inverter_table').on("click", "button.edit-btn", function () { $("#Inverter-modal .modal-title").html("逆變器 - 編輯"); - + document.getElementById('Inverter_Status_modal').disabled = true; selected_id = $(this).parents('tr').attr('data-id'); var url = "/PowerStation/GetOneInverter/"; @@ -2148,8 +2147,6 @@ toast_error(rel.msg); return; } - - document.getElementById('Inverter_Status_modal').disabled = false; document.getElementById('Inverter_Enabled_modal').disabled = false; $("#Inverter_ControllerId_modal").val(rel.data.controllerId); $("#Inverter_InverterName_modal").val(rel.data.inverterName); diff --git a/SolarPower/Views/PowerStation/_DeviceSetting.cshtml b/SolarPower/Views/PowerStation/_DeviceSetting.cshtml index d63ddad..041d783 100644 --- a/SolarPower/Views/PowerStation/_DeviceSetting.cshtml +++ b/SolarPower/Views/PowerStation/_DeviceSetting.cshtml @@ -275,12 +275,12 @@ -
+ @*
-
+
*@