diff --git a/SolarPower/Helper/DatabaseHelper.cs b/SolarPower/Helper/DatabaseHelper.cs index 123d5e4..7ce0dc2 100644 --- a/SolarPower/Helper/DatabaseHelper.cs +++ b/SolarPower/Helper/DatabaseHelper.cs @@ -32,12 +32,13 @@ namespace SolarPower.Helper EDFunction ed = new EDFunction(); var serverStr = ed.AESDecrypt(dbConfig.Server); + var portStr = ed.AESDecrypt(dbConfig.Port); var databaseStr = ed.AESDecrypt(dbConfig.Database); var rootStr = ed.AESDecrypt(dbConfig.Root); var passwordStr = ed.AESDecrypt(dbConfig.Password); - //var connStr = $"server={serverStr};database={databaseStr};user={rootStr};password={passwordStr};charset=utf8;"; - var connStr = @"server=210.61.91.43;port=10068;database=solar_power_test;user=idafenweb;password=P@ssw0rd;charset=utf8;"; + var connStr = $"server={serverStr};port={portStr};database={databaseStr};user={rootStr};password={passwordStr};charset=utf8;"; + //var connStr = @"server=210.61.91.43;port=10068;database=solar_power_test;user=idafenweb;password=P@ssw0rd;charset=utf8;"; this._connectionString = connStr; } diff --git a/SolarPower/Models/DBConfig.cs b/SolarPower/Models/DBConfig.cs index c3209cb..3378bcf 100644 --- a/SolarPower/Models/DBConfig.cs +++ b/SolarPower/Models/DBConfig.cs @@ -8,6 +8,7 @@ namespace SolarPower.Models public class DBConfig { public string Server { get; set; } + public string Port { get; set; } public string Database { get; set; } public string Root { get; set; } public string Password { get; set; } diff --git a/SolarPower/Startup.cs b/SolarPower/Startup.cs index 6c549c1..52301b1 100644 --- a/SolarPower/Startup.cs +++ b/SolarPower/Startup.cs @@ -34,6 +34,7 @@ namespace SolarPower Configuration = configuration; dBConfig.Server = Configuration.GetValue("DBConfig:Server"); + dBConfig.Port = Configuration.GetValue("DBConfig:Port"); dBConfig.Database = Configuration.GetValue("DBConfig:Database"); dBConfig.Root = Configuration.GetValue("DBConfig:Root"); dBConfig.Password = Configuration.GetValue("DBConfig:Password"); diff --git a/SolarPower/Views/Operation/OperationRecord.cshtml b/SolarPower/Views/Operation/OperationRecord.cshtml index ab7f743..bc36ff3 100644 --- a/SolarPower/Views/Operation/OperationRecord.cshtml +++ b/SolarPower/Views/Operation/OperationRecord.cshtml @@ -204,7 +204,7 @@

檔案上傳

-
+
@@ -387,7 +387,7 @@ 'targets': 7, 'searchable': false, 'orderable': false, - 'className': 'dt-body-center', + 'className': 'dt-body-center img-zoom-div', 'createdCell': function (td, cellData, rowData, row, col) { $(td).empty(); $(td).append('
'); @@ -601,6 +601,13 @@ OperationPlanTable.ajax.reload(); }) + //#endregion + + //#region 點擊圖片放大 + $('#operation_recode_table').on("click", "img.img-zoom", function () { + var _this = $(this);//將當前的pimg元素作為_this傳入函式 + imgShow("#img-zoom-outer-div", "#innerdiv", "#bigimg", _this); + }); //#endregion //#region 編輯表單內容 @@ -672,6 +679,7 @@ }); //#endregion + //#region 表單驗證 $("#recode-form").validate({ rules: { @@ -808,7 +816,7 @@ } else if (word_format.indexOf(split[split.length - 1].toLowerCase()) > -1) { str += ''; } else { - str += ''; + str += ''; } str += '
'; dom.append(str); diff --git a/SolarPower/Views/Shared/_Layout.cshtml b/SolarPower/Views/Shared/_Layout.cshtml index 43de41b..efcc7e8 100644 --- a/SolarPower/Views/Shared/_Layout.cshtml +++ b/SolarPower/Views/Shared/_Layout.cshtml @@ -31,7 +31,7 @@ - + @@ -1095,9 +1095,9 @@ -