From d86ea0391624ae5c330afd650961c0e81da1cc95 Mon Sep 17 00:00:00 2001 From: JiaHao Liu Date: Fri, 6 Aug 2021 11:04:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AA=A2=E6=A0=B8=E6=9F=A5=E8=A9=A2OK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- solarApp/Model/station_model.cs | 13 +- solarApp/Service/getInvSvc.cs | 54 ++- solarApp/Service/getStationSvc.cs | 89 ++++- solarApp/Service/myHelper.cs | 20 + solarApp/fmMain.Designer.cs | 615 +++++++++++++++++++++--------- solarApp/fmMain.cs | 168 ++++---- 6 files changed, 654 insertions(+), 305 deletions(-) create mode 100644 solarApp/Service/myHelper.cs diff --git a/solarApp/Model/station_model.cs b/solarApp/Model/station_model.cs index eac28f3..ff0a4f5 100644 --- a/solarApp/Model/station_model.cs +++ b/solarApp/Model/station_model.cs @@ -32,7 +32,7 @@ namespace solarApp.Model public class web_station_hour { - // public string siteid { get; set; } + public string siteid { get; set; } public string reportdate { get; set; } public double KWH { get; set; } public double TODAYKWH { get; set; } @@ -48,7 +48,7 @@ namespace solarApp.Model public class web_station_day { - // public string siteid { get; set; } + public string siteid { get; set; } public string reportdate { get; set; } public double TODAYKWH { get; set; } public double TOTALKWH { get; set; } @@ -56,4 +56,13 @@ namespace solarApp.Model public double SOLARHOUR { get; set; } public double kwhkwp { get; set; } } + + public class station_list + { + public string id { get; set; } + public string CompanyID { get; set; } + public string SiteID { get; set; } + public string SiteDB { get; set; } + public string SiteName { get; set; } + } } diff --git a/solarApp/Service/getInvSvc.cs b/solarApp/Service/getInvSvc.cs index 8a047f4..0b0aa0e 100644 --- a/solarApp/Service/getInvSvc.cs +++ b/solarApp/Service/getInvSvc.cs @@ -18,14 +18,15 @@ namespace solarApp.Service /// /// /// - public List Get_rawInv(string reportDate, string invID) + public List Get_rawInv(string reportDate, string invID, string siteDB, string siteID) { using (MySqlConnection conn = new MySqlConnection(Connection1)) { conn.Open(); //string sql = @"select ID, TIMESTAMP, SITEID, SITETYPE, CONTROLLERID, INVERTERID, SN, AC1V, AC1A, AC1W, AC1F, AC1WH, AC2V, AC2A, AC2W, AC2F, AC2WH, AC3V, AC3A, AC3W, AC3F, AC3WH, ACRUNTIME, DC1V, DC1A, DC1W, DC1WH, DC2V, DC2A, DC2W, DC2WH, DC3V, DC3A, DC3W, DC3WH, DC4V, DC4A, DC4W, DC4WH, DC5V, DC5A, DC5W, DC5WH, DCRUNTIME, WH, TODAYKWH, TOTALKWH, PR, RA1, RA2, RA3, RA4, RA5 // from solar_com0002.s02202000101_inv order by id desc limit 100; "; - string sql = @"select id , reportdate, inverterid, WH, TODAYKWH, TOTALKWH, PR, RA1 from v_inv_temp where left(reportdate, 10) = '" + reportDate + "' and inverterid = '" + invID + "'"; + string sql = @"select id , FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i') reportdate, inverterid, WH,round(TODAYKWH, 2) TODAYKWH, round(TOTALKWH, 2) TOTALKWH,round(PR, 2) PR, RA1 + from " + siteDB + ".s" + siteID + @"_inv where left(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i') , 10) = '" + reportDate + "' and inverterid = '" + invID + "'"; //List ds = conn.Query(sql, new { kind = kind }).ToList(); List ds = conn.Query(sql).AsList(); @@ -39,7 +40,7 @@ namespace solarApp.Service /// /// /// - public List get_Inv_rawAvg(string reportDate, string invID) + public List get_Inv_rawAvg(string reportDate, string invID, string siteDB, string siteID) { using (MySqlConnection conn = new MySqlConnection(Connection1)) { @@ -50,16 +51,15 @@ namespace solarApp.Service // "group by left(reportdate, 13), inverterid"; //round(avg(PR), 2) PR, string sql = @" select a.reportdate, a.inverterid, a.KWH, b.TODAYKWH, b.TOTALKWH, b.PR, a.count from ( - select left(reportdate, 13)reportdate, inverterid + select left(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i') , 13)reportdate, inverterid ,round((sum(WH)/1000), 2) KWH, count(*) count - from v_inv_temp - where left(reportdate, 10) = '" + reportDate + "' and inverterid = '" + invID + @"' - - group by left(reportdate, 13), inverterid + from " + siteDB + ".s" + siteID + @"_inv + where FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d') = '" + reportDate + "' and inverterid = '" + invID + @"' + group by left(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i'), 13), inverterid )a join ( - select reportdate, round(TODAYKWH, 2) TODAYKWH, round(TOTALKWH, 2) TOTALKWH, inverterid, round(PR, 2) PR - from v_inv_temp - where left(reportdate, 10) = '" + reportDate + @"' and right(reportdate, 2) = '55' and inverterid = '" + invID + @"' + select FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i') reportdate, round(TODAYKWH, 2) TODAYKWH, round(TOTALKWH, 2) TOTALKWH, inverterid, round(PR, 2) PR + from " + siteDB + ".s" + siteID + @"_inv + where FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d') = '" + reportDate + @"' and right(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i'), 2) = '55' and inverterid = '" + invID + @"' )b on a.reportdate = left(b.reportdate, 13) and a.inverterid = b.inverterid "; List ds = conn.Query(sql).AsList(); conn.Close(); @@ -86,19 +86,45 @@ namespace solarApp.Service } } + public List get_web_Inv_day(string reportDate, string invID) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + string sql = @"select `TIMESTAMP` reportdate, inverterid, KWH, TODAYKWH, TOTALKWH, round(PR, 2) PR + from inverter_history_day where left(`TIMESTAMP`, 10) = '" + reportDate + "' and inverterid = '" + invID + "' "; + List ds = conn.Query(sql).AsList(); + conn.Close(); + return ds; + } + } + + public List get_web_Inv_month(string reportDate, string invID) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + string sql = @"select `TIMESTAMP` reportdate, inverterid, KWH, TODAYKWH, TOTALKWH, round(PR, 2) PR + from inverter_history_month where left(`TIMESTAMP`, 7) = '" + reportDate + "' and inverterid = '" + invID + "' "; + List ds = conn.Query(sql).AsList(); + conn.Close(); + return ds; + } + } + /// /// /// /// /// /// - public List get_Inv_list() + public List get_Inv_list(string siteDB, string siteID) { using (MySqlConnection conn = new MySqlConnection(Connection1)) { conn.Open(); - string sql = @"select dbname, inverterid from v_company_inv"; - List ds = conn.Query(sql).AsList(); + string sql = @"select dbname, inverterid from v_company_inv where dbname = @siteDB and left(inverterid, 9) = @siteID"; + List ds = conn.Query(sql, new { siteDB = siteDB, siteID = siteID }).AsList(); conn.Close(); return ds; } diff --git a/solarApp/Service/getStationSvc.cs b/solarApp/Service/getStationSvc.cs index 345abfb..e16d2f9 100644 --- a/solarApp/Service/getStationSvc.cs +++ b/solarApp/Service/getStationSvc.cs @@ -14,27 +14,29 @@ namespace solarApp.Service public class getStationSvc { string Connection1 = ConfigurationManager.ConnectionStrings["mySql"].ConnectionString; - public List get_station_raw(string reportDate) + /// + /// 電站 Raw Data + /// + /// + /// + /// + /// + public List get_station_raw(string reportDate, string siteDB, string siteID) { using (MySqlConnection conn = new MySqlConnection(Connection1)) { conn.Open(); - string sql = @"select id , reportdate, siteid, KWH, TODAYKWH, TOTALKWH, PR, SOLARHOUR, kwhkwp - from v_station_temp - where siteid = '022020001' and left(reportdate, 10) = @reportDate"; + string sql = @"select id , FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i') reportdate, siteid, round(KWH, 3) KWH, round(TODAYKWH, 3) TODAYKWH, + round(TOTALKWH, 3)TOTALKWH, round(PR, 3) PR, round(TODAYKWH, 3)SOLARHOUR , round(kwhkwp, 3) kwhkwp + from " + siteDB + ".s" + siteID + @"_station + where left(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i'), 10) = @reportDate"; List ds = conn.Query(sql, new { reportDate = reportDate }).AsList(); conn.Close(); return ds; } } - - /// - /// 電站每天平均 from RawData - /// - /// - /// - /// - public List get_station_rawAvg(string date1, string date2) + #region 全區使用的 view + public List create_v_station_inv(string date1, string date2) { using (MySqlConnection conn = new MySqlConnection(Connection1)) { @@ -43,13 +45,43 @@ namespace solarApp.Service round((max(PR)), 2) PR, round((max(SOLARHOUR)), 2) SOLARHOUR, round((max(KWHKWP)), 2) KWHKWP, count(*) count from v_station_temp where left(reportdate, 10) between @date1 and @date2 - group by siteid, left(reportdate, 10)"; + group by siteid, left(reportdate, 10)"; List ds = conn.Query(sql, new { date1 = date1, date2 = date2 }).AsList(); conn.Close(); return ds; } } + #endregion + /// + /// 電站每天平均 from RawData + /// + /// + /// + /// + public List get_station_rawAvg(string date1, string date2, string siteDB, string siteID) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + //string sql = @" select siteid, left(reportdate, 10) reportdate, round((sum(KWH)), 2) KWH, round((max(TODAYKWH)), 2) TODAYKWH, round((max(TOTALKWH)), 2) TOTALKWH, + // round((max(PR)), 2) PR, round((max(SOLARHOUR)), 2) SOLARHOUR, round((max(KWHKWP)), 2) KWHKWP, count(*) count + // from v_station_temp + // where left(reportdate, 10) between @date1 and @date2 + // group by siteid, left(reportdate, 10)"; + string sql = @" select siteid, left(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i'), 10) reportdate, round((sum(KWH)), 2) KWH, round((max(TODAYKWH)), 2) TODAYKWH, round((max(TOTALKWH)), 2) TOTALKWH, + round((max(PR)), 2) PR, round((max(SOLARHOUR)), 2) SOLARHOUR, round((max(KWHKWP)), 2) KWHKWP, count(*) count + from " + siteDB+ ".s"+ siteID + @"_station + where left(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i'), 10) between @date1 and @date2 + group by siteid, left(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i'), 10)"; + List ds = conn.Query(sql, new { date1 = date1, date2 = date2 }).AsList(); + conn.Close(); + return ds; + } + } + + + /// /// web 呈現值 station - hour /// @@ -88,5 +120,36 @@ namespace solarApp.Service return ds; } } + + public List get_web_station_month(string date1, string date2) + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); + string sql = @" select DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d') reportdate, siteid, round(TOTALKWH, 2) TOTALKWH, round(PR, 3) PR, round(KWHKWP, 3) KWHKWP, money + from power_station_history_month where left(`TIMESTAMP`, 7) between @date1 and @date2 "; + List ds = conn.Query(sql, new { date1 = date1, date2 = date2 }).AsList(); + conn.Close(); + return ds; + } + } + + /// + /// 取得電站資訊 + /// + /// + public List get_station_list() + { + using (MySqlConnection conn = new MySqlConnection(Connection1)) + { + conn.Open(); // 01 控制器編號 + string sql = @" select id, CompanyId, `code` , SerialNumber, CONCAT(`code` ,'01') SiteID, SiteDB, `name` SiteName + from power_station + where id in (1, 8)"; + List ds = conn.Query(sql).AsList(); + conn.Close(); + return ds; + } + } } } diff --git a/solarApp/Service/myHelper.cs b/solarApp/Service/myHelper.cs new file mode 100644 index 0000000..3ff098e --- /dev/null +++ b/solarApp/Service/myHelper.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace solarApp.Service +{ + //static class myHelper + //{ + + //} + public static class ListHelper + { + public static string ToSiteTable(this IList list) + { + + return string.Join(", ", list.ToArray()); + } + } +} diff --git a/solarApp/fmMain.Designer.cs b/solarApp/fmMain.Designer.cs index 86299d6..136b60e 100644 --- a/solarApp/fmMain.Designer.cs +++ b/solarApp/fmMain.Designer.cs @@ -36,16 +36,30 @@ namespace solarApp System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tb_inv = new System.Windows.Forms.TabPage(); this.sp_main_inv = new System.Windows.Forms.SplitContainer(); + this.lbSiteDB_inv = new System.Windows.Forms.Label(); + this.lbSiteID_inv = new System.Windows.Forms.Label(); + this.lbSiteName_inv = new System.Windows.Forms.Label(); this.lbMsg_inv = new System.Windows.Forms.Label(); this.lbInverterID = new System.Windows.Forms.Label(); this.fp_inv = new System.Windows.Forms.FlowLayoutPanel(); this.label4 = new System.Windows.Forms.Label(); - this.bt_select1 = new System.Windows.Forms.Button(); + this.bt_InvSearch = new System.Windows.Forms.Button(); this.dtselect_inv = new System.Windows.Forms.DateTimePicker(); this.sp_child_inv = new System.Windows.Forms.SplitContainer(); + this.gv_web_inv_month = new System.Windows.Forms.DataGridView(); + this.panel9 = new System.Windows.Forms.Panel(); + this.label16 = new System.Windows.Forms.Label(); + this.label17 = new System.Windows.Forms.Label(); + this.gv_web_inv_day = new System.Windows.Forms.DataGridView(); + this.panel8 = new System.Windows.Forms.Panel(); + this.label14 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); this.gv_web_inv_hour = new System.Windows.Forms.DataGridView(); this.panel1 = new System.Windows.Forms.Panel(); this.label3 = new System.Windows.Forms.Label(); @@ -55,18 +69,22 @@ namespace solarApp this.label1 = new System.Windows.Forms.Label(); this.gv_fic_inv_raw = new System.Windows.Forms.DataGridView(); this.panel2 = new System.Windows.Forms.Panel(); - this.label2 = new System.Windows.Forms.Label(); + this.lbInvRaw = new System.Windows.Forms.Label(); this.lb_raw_inv_hour = new System.Windows.Forms.Label(); this.tb2 = new System.Windows.Forms.TabPage(); this.sp_main_station = new System.Windows.Forms.SplitContainer(); + this.label13 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.dtselect_station2 = new System.Windows.Forms.DateTimePicker(); this.lbMsg_station = new System.Windows.Forms.Label(); this.bt_find_station = new System.Windows.Forms.Button(); this.dtselect_station1 = new System.Windows.Forms.DateTimePicker(); - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.label13 = new System.Windows.Forms.Label(); + this.fp_site = new System.Windows.Forms.FlowLayoutPanel(); this.sp_child_station = new System.Windows.Forms.SplitContainer(); + this.gv_web_station_month = new System.Windows.Forms.DataGridView(); + this.panel10 = new System.Windows.Forms.Panel(); + this.label18 = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); this.gv_web_station_day = new System.Windows.Forms.DataGridView(); this.panel7 = new System.Windows.Forms.Panel(); this.label10 = new System.Windows.Forms.Label(); @@ -80,7 +98,7 @@ namespace solarApp this.label7 = new System.Windows.Forms.Label(); this.gv_fic_station_raw = new System.Windows.Forms.DataGridView(); this.panel6 = new System.Windows.Forms.Panel(); - this.label8 = new System.Windows.Forms.Label(); + this.lbSiteRaw = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); this.tabControl1.SuspendLayout(); this.tb_inv.SuspendLayout(); @@ -93,6 +111,10 @@ namespace solarApp this.sp_child_inv.Panel1.SuspendLayout(); this.sp_child_inv.Panel2.SuspendLayout(); this.sp_child_inv.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_inv_month)).BeginInit(); + this.panel9.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_inv_day)).BeginInit(); + this.panel8.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gv_web_inv_hour)).BeginInit(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gv_fic_inv_hour)).BeginInit(); @@ -104,11 +126,12 @@ namespace solarApp this.sp_main_station.Panel1.SuspendLayout(); this.sp_main_station.Panel2.SuspendLayout(); this.sp_main_station.SuspendLayout(); - this.flowLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.sp_child_station)).BeginInit(); this.sp_child_station.Panel1.SuspendLayout(); this.sp_child_station.Panel2.SuspendLayout(); this.sp_child_station.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_station_month)).BeginInit(); + this.panel10.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gv_web_station_day)).BeginInit(); this.panel7.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gv_web_station_hour)).BeginInit(); @@ -125,55 +148,88 @@ namespace solarApp this.tabControl1.Controls.Add(this.tb2); this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControl1.Location = new System.Drawing.Point(0, 0); - this.tabControl1.Margin = new System.Windows.Forms.Padding(2); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(1356, 848); + this.tabControl1.Size = new System.Drawing.Size(1743, 1074); this.tabControl1.TabIndex = 0; // // tb_inv // this.tb_inv.BackColor = System.Drawing.Color.Azure; this.tb_inv.Controls.Add(this.sp_main_inv); - this.tb_inv.Location = new System.Drawing.Point(4, 24); - this.tb_inv.Margin = new System.Windows.Forms.Padding(2); + this.tb_inv.Location = new System.Drawing.Point(4, 28); this.tb_inv.Name = "tb_inv"; - this.tb_inv.Padding = new System.Windows.Forms.Padding(2); - this.tb_inv.Size = new System.Drawing.Size(1348, 820); + this.tb_inv.Padding = new System.Windows.Forms.Padding(3); + this.tb_inv.Size = new System.Drawing.Size(1735, 1042); this.tb_inv.TabIndex = 0; this.tb_inv.Text = " Inverter "; // // sp_main_inv // this.sp_main_inv.Dock = System.Windows.Forms.DockStyle.Fill; - this.sp_main_inv.Location = new System.Drawing.Point(2, 2); - this.sp_main_inv.Margin = new System.Windows.Forms.Padding(2); + this.sp_main_inv.Location = new System.Drawing.Point(3, 3); this.sp_main_inv.Name = "sp_main_inv"; // // sp_main_inv.Panel1 // this.sp_main_inv.Panel1.BackColor = System.Drawing.Color.LightCyan; + this.sp_main_inv.Panel1.Controls.Add(this.lbSiteDB_inv); + this.sp_main_inv.Panel1.Controls.Add(this.lbSiteID_inv); + this.sp_main_inv.Panel1.Controls.Add(this.lbSiteName_inv); this.sp_main_inv.Panel1.Controls.Add(this.lbMsg_inv); this.sp_main_inv.Panel1.Controls.Add(this.lbInverterID); this.sp_main_inv.Panel1.Controls.Add(this.fp_inv); - this.sp_main_inv.Panel1.Controls.Add(this.bt_select1); + this.sp_main_inv.Panel1.Controls.Add(this.bt_InvSearch); this.sp_main_inv.Panel1.Controls.Add(this.dtselect_inv); // // sp_main_inv.Panel2 // this.sp_main_inv.Panel2.Controls.Add(this.sp_child_inv); - this.sp_main_inv.Size = new System.Drawing.Size(1344, 816); - this.sp_main_inv.SplitterDistance = 273; - this.sp_main_inv.SplitterWidth = 3; + this.sp_main_inv.Size = new System.Drawing.Size(1729, 1036); + this.sp_main_inv.SplitterDistance = 351; this.sp_main_inv.TabIndex = 0; // + // lbSiteDB_inv + // + this.lbSiteDB_inv.AutoSize = true; + this.lbSiteDB_inv.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.lbSiteDB_inv.Location = new System.Drawing.Point(36, 100); + this.lbSiteDB_inv.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lbSiteDB_inv.Name = "lbSiteDB_inv"; + this.lbSiteDB_inv.Size = new System.Drawing.Size(79, 24); + this.lbSiteDB_inv.TabIndex = 8; + this.lbSiteDB_inv.Text = "Site_DB"; + // + // lbSiteID_inv + // + this.lbSiteID_inv.AutoSize = true; + this.lbSiteID_inv.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.lbSiteID_inv.Location = new System.Drawing.Point(36, 58); + this.lbSiteID_inv.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lbSiteID_inv.Name = "lbSiteID_inv"; + this.lbSiteID_inv.Size = new System.Drawing.Size(72, 24); + this.lbSiteID_inv.TabIndex = 7; + this.lbSiteID_inv.Text = "Site_ID"; + // + // lbSiteName_inv + // + this.lbSiteName_inv.AutoSize = true; + this.lbSiteName_inv.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.lbSiteName_inv.Location = new System.Drawing.Point(36, 14); + this.lbSiteName_inv.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lbSiteName_inv.Name = "lbSiteName_inv"; + this.lbSiteName_inv.Size = new System.Drawing.Size(107, 24); + this.lbSiteName_inv.TabIndex = 6; + this.lbSiteName_inv.Text = "Site_Name"; + // // lbMsg_inv // this.lbMsg_inv.AutoSize = true; this.lbMsg_inv.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.lbMsg_inv.Location = new System.Drawing.Point(111, 59); + this.lbMsg_inv.Location = new System.Drawing.Point(155, 212); + this.lbMsg_inv.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lbMsg_inv.Name = "lbMsg_inv"; - this.lbMsg_inv.Size = new System.Drawing.Size(18, 19); + this.lbMsg_inv.Size = new System.Drawing.Size(22, 24); this.lbMsg_inv.TabIndex = 5; this.lbMsg_inv.Text = "..."; // @@ -182,9 +238,10 @@ namespace solarApp this.lbInverterID.AutoSize = true; this.lbInverterID.Dock = System.Windows.Forms.DockStyle.Bottom; this.lbInverterID.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.lbInverterID.Location = new System.Drawing.Point(0, 288); + this.lbInverterID.Location = new System.Drawing.Point(0, 367); + this.lbInverterID.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lbInverterID.Name = "lbInverterID"; - this.lbInverterID.Size = new System.Drawing.Size(112, 19); + this.lbInverterID.Size = new System.Drawing.Size(142, 24); this.lbInverterID.TabIndex = 3; this.lbInverterID.Text = "請選擇 Inverter"; // @@ -194,39 +251,39 @@ namespace solarApp this.fp_inv.Controls.Add(this.label4); this.fp_inv.Dock = System.Windows.Forms.DockStyle.Bottom; this.fp_inv.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.fp_inv.Location = new System.Drawing.Point(0, 307); + this.fp_inv.Location = new System.Drawing.Point(0, 391); + this.fp_inv.Margin = new System.Windows.Forms.Padding(4); this.fp_inv.Name = "fp_inv"; - this.fp_inv.Size = new System.Drawing.Size(273, 509); + this.fp_inv.Size = new System.Drawing.Size(351, 645); this.fp_inv.TabIndex = 2; // // label4 // this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label4.Location = new System.Drawing.Point(3, 0); + this.label4.Location = new System.Drawing.Point(4, 0); + this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(112, 19); + this.label4.Size = new System.Drawing.Size(142, 24); this.label4.TabIndex = 4; this.label4.Text = "請選擇 Inverter"; // - // bt_select1 + // bt_InvSearch // - this.bt_select1.Location = new System.Drawing.Point(19, 57); - this.bt_select1.Margin = new System.Windows.Forms.Padding(2); - this.bt_select1.Name = "bt_select1"; - this.bt_select1.Size = new System.Drawing.Size(73, 23); - this.bt_select1.TabIndex = 1; - this.bt_select1.Text = "查詢"; - this.bt_select1.UseVisualStyleBackColor = true; - this.bt_select1.Click += new System.EventHandler(this.button1_Click); + this.bt_InvSearch.Location = new System.Drawing.Point(36, 209); + this.bt_InvSearch.Name = "bt_InvSearch"; + this.bt_InvSearch.Size = new System.Drawing.Size(94, 29); + this.bt_InvSearch.TabIndex = 1; + this.bt_InvSearch.Text = "查詢"; + this.bt_InvSearch.UseVisualStyleBackColor = true; + this.bt_InvSearch.Click += new System.EventHandler(this.button1_Click); // // dtselect_inv // this.dtselect_inv.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.dtselect_inv.Location = new System.Drawing.Point(19, 20); - this.dtselect_inv.Margin = new System.Windows.Forms.Padding(2); + this.dtselect_inv.Location = new System.Drawing.Point(36, 162); this.dtselect_inv.Name = "dtselect_inv"; - this.dtselect_inv.Size = new System.Drawing.Size(195, 26); + this.dtselect_inv.Size = new System.Drawing.Size(250, 31); this.dtselect_inv.TabIndex = 0; this.dtselect_inv.ValueChanged += new System.EventHandler(this.dtselect_ValueChanged); // @@ -234,10 +291,15 @@ namespace solarApp // this.sp_child_inv.Dock = System.Windows.Forms.DockStyle.Fill; this.sp_child_inv.Location = new System.Drawing.Point(0, 0); + this.sp_child_inv.Margin = new System.Windows.Forms.Padding(4); this.sp_child_inv.Name = "sp_child_inv"; // // sp_child_inv.Panel1 // + this.sp_child_inv.Panel1.Controls.Add(this.gv_web_inv_month); + this.sp_child_inv.Panel1.Controls.Add(this.panel9); + this.sp_child_inv.Panel1.Controls.Add(this.gv_web_inv_day); + this.sp_child_inv.Panel1.Controls.Add(this.panel8); this.sp_child_inv.Panel1.Controls.Add(this.gv_web_inv_hour); this.sp_child_inv.Panel1.Controls.Add(this.panel1); // @@ -247,24 +309,126 @@ namespace solarApp this.sp_child_inv.Panel2.Controls.Add(this.panel3); this.sp_child_inv.Panel2.Controls.Add(this.gv_fic_inv_raw); this.sp_child_inv.Panel2.Controls.Add(this.panel2); - this.sp_child_inv.Size = new System.Drawing.Size(1068, 816); - this.sp_child_inv.SplitterDistance = 518; - this.sp_child_inv.SplitterWidth = 10; + this.sp_child_inv.Size = new System.Drawing.Size(1374, 1036); + this.sp_child_inv.SplitterDistance = 666; + this.sp_child_inv.SplitterWidth = 13; this.sp_child_inv.TabIndex = 0; // + // gv_web_inv_month + // + this.gv_web_inv_month.AllowUserToAddRows = false; + this.gv_web_inv_month.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.Azure; + this.gv_web_inv_month.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.gv_web_inv_month.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_web_inv_month.Dock = System.Windows.Forms.DockStyle.Fill; + this.gv_web_inv_month.Location = new System.Drawing.Point(0, 853); + this.gv_web_inv_month.Margin = new System.Windows.Forms.Padding(4); + this.gv_web_inv_month.Name = "gv_web_inv_month"; + this.gv_web_inv_month.ReadOnly = true; + this.gv_web_inv_month.RowHeadersWidth = 51; + this.gv_web_inv_month.RowTemplate.Height = 25; + this.gv_web_inv_month.Size = new System.Drawing.Size(666, 183); + this.gv_web_inv_month.TabIndex = 7; + // + // panel9 + // + this.panel9.Controls.Add(this.label16); + this.panel9.Controls.Add(this.label17); + this.panel9.Dock = System.Windows.Forms.DockStyle.Top; + this.panel9.Location = new System.Drawing.Point(0, 815); + this.panel9.Margin = new System.Windows.Forms.Padding(4); + this.panel9.Name = "panel9"; + this.panel9.Size = new System.Drawing.Size(666, 38); + this.panel9.TabIndex = 6; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label16.Location = new System.Drawing.Point(230, 8); + this.label16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(339, 24); + this.label16.TabIndex = 1; + this.label16.Text = "solar_master.inverter_history_month"; + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label17.Location = new System.Drawing.Point(35, 8); + this.label17.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(127, 24); + this.label17.TabIndex = 0; + this.label17.Text = "web: inv 每月"; + // + // gv_web_inv_day + // + this.gv_web_inv_day.AllowUserToAddRows = false; + this.gv_web_inv_day.AllowUserToDeleteRows = false; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.Azure; + this.gv_web_inv_day.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle2; + this.gv_web_inv_day.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_web_inv_day.Dock = System.Windows.Forms.DockStyle.Top; + this.gv_web_inv_day.Location = new System.Drawing.Point(0, 583); + this.gv_web_inv_day.Margin = new System.Windows.Forms.Padding(4); + this.gv_web_inv_day.Name = "gv_web_inv_day"; + this.gv_web_inv_day.ReadOnly = true; + this.gv_web_inv_day.RowHeadersWidth = 51; + this.gv_web_inv_day.RowTemplate.Height = 25; + this.gv_web_inv_day.Size = new System.Drawing.Size(666, 232); + this.gv_web_inv_day.TabIndex = 4; + // + // panel8 + // + this.panel8.Controls.Add(this.label14); + this.panel8.Controls.Add(this.label15); + this.panel8.Dock = System.Windows.Forms.DockStyle.Top; + this.panel8.Location = new System.Drawing.Point(0, 545); + this.panel8.Margin = new System.Windows.Forms.Padding(4); + this.panel8.Name = "panel8"; + this.panel8.Size = new System.Drawing.Size(666, 38); + this.panel8.TabIndex = 3; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label14.Location = new System.Drawing.Point(230, 8); + this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(310, 24); + this.label14.TabIndex = 1; + this.label14.Text = "solar_master.inverter_history_day"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label15.Location = new System.Drawing.Point(35, 8); + this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(127, 24); + this.label15.TabIndex = 0; + this.label15.Text = "web: inv 每天"; + // // gv_web_inv_hour // this.gv_web_inv_hour.AllowUserToAddRows = false; this.gv_web_inv_hour.AllowUserToDeleteRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.Azure; - this.gv_web_inv_hour.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.Azure; + this.gv_web_inv_hour.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; this.gv_web_inv_hour.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.gv_web_inv_hour.Dock = System.Windows.Forms.DockStyle.Fill; - this.gv_web_inv_hour.Location = new System.Drawing.Point(0, 30); + this.gv_web_inv_hour.Dock = System.Windows.Forms.DockStyle.Top; + this.gv_web_inv_hour.Location = new System.Drawing.Point(0, 38); + this.gv_web_inv_hour.Margin = new System.Windows.Forms.Padding(4); this.gv_web_inv_hour.Name = "gv_web_inv_hour"; this.gv_web_inv_hour.ReadOnly = true; + this.gv_web_inv_hour.RowHeadersWidth = 51; this.gv_web_inv_hour.RowTemplate.Height = 25; - this.gv_web_inv_hour.Size = new System.Drawing.Size(518, 786); + this.gv_web_inv_hour.Size = new System.Drawing.Size(666, 507); this.gv_web_inv_hour.TabIndex = 1; // // panel1 @@ -273,17 +437,19 @@ namespace solarApp this.panel1.Controls.Add(this.lb_inv_hour); this.panel1.Dock = System.Windows.Forms.DockStyle.Top; this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Margin = new System.Windows.Forms.Padding(4); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(518, 30); + this.panel1.Size = new System.Drawing.Size(666, 38); this.panel1.TabIndex = 0; // // label3 // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label3.Location = new System.Drawing.Point(179, 6); + this.label3.Location = new System.Drawing.Point(230, 8); + this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(250, 19); + this.label3.Size = new System.Drawing.Size(321, 24); this.label3.TabIndex = 1; this.label3.Text = "solar_master.inverter_history_hour"; // @@ -291,9 +457,10 @@ namespace solarApp // this.lb_inv_hour.AutoSize = true; this.lb_inv_hour.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.lb_inv_hour.Location = new System.Drawing.Point(27, 6); + this.lb_inv_hour.Location = new System.Drawing.Point(35, 8); + this.lb_inv_hour.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lb_inv_hour.Name = "lb_inv_hour"; - this.lb_inv_hour.Size = new System.Drawing.Size(119, 19); + this.lb_inv_hour.Size = new System.Drawing.Size(151, 24); this.lb_inv_hour.TabIndex = 0; this.lb_inv_hour.Text = "web: inv 每小時 "; // @@ -301,15 +468,17 @@ namespace solarApp // this.gv_fic_inv_hour.AllowUserToAddRows = false; this.gv_fic_inv_hour.AllowUserToDeleteRows = false; - dataGridViewCellStyle2.BackColor = System.Drawing.Color.LightCyan; - this.gv_fic_inv_hour.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.LightCyan; + this.gv_fic_inv_hour.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; this.gv_fic_inv_hour.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.gv_fic_inv_hour.Dock = System.Windows.Forms.DockStyle.Fill; - this.gv_fic_inv_hour.Location = new System.Drawing.Point(0, 460); + this.gv_fic_inv_hour.Location = new System.Drawing.Point(0, 583); + this.gv_fic_inv_hour.Margin = new System.Windows.Forms.Padding(4); this.gv_fic_inv_hour.Name = "gv_fic_inv_hour"; this.gv_fic_inv_hour.ReadOnly = true; + this.gv_fic_inv_hour.RowHeadersWidth = 51; this.gv_fic_inv_hour.RowTemplate.Height = 25; - this.gv_fic_inv_hour.Size = new System.Drawing.Size(540, 356); + this.gv_fic_inv_hour.Size = new System.Drawing.Size(695, 453); this.gv_fic_inv_hour.TabIndex = 4; this.gv_fic_inv_hour.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.gv_fic_inv_hour_CellFormatting); // @@ -317,18 +486,20 @@ namespace solarApp // this.panel3.Controls.Add(this.label1); this.panel3.Dock = System.Windows.Forms.DockStyle.Top; - this.panel3.Location = new System.Drawing.Point(0, 430); + this.panel3.Location = new System.Drawing.Point(0, 545); + this.panel3.Margin = new System.Windows.Forms.Padding(4); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(540, 30); + this.panel3.Size = new System.Drawing.Size(695, 38); this.panel3.TabIndex = 3; // // label1 // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label1.Location = new System.Drawing.Point(12, 6); + this.label1.Location = new System.Drawing.Point(15, 8); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(112, 19); + this.label1.Size = new System.Drawing.Size(141, 24); this.label1.TabIndex = 2; this.label1.Text = "FIC: inv 每小時 "; // @@ -336,55 +507,59 @@ namespace solarApp // this.gv_fic_inv_raw.AllowUserToAddRows = false; this.gv_fic_inv_raw.AllowUserToDeleteRows = false; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.LightCyan; - this.gv_fic_inv_raw.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.LightCyan; + this.gv_fic_inv_raw.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5; this.gv_fic_inv_raw.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.gv_fic_inv_raw.Dock = System.Windows.Forms.DockStyle.Top; - this.gv_fic_inv_raw.Location = new System.Drawing.Point(0, 30); + this.gv_fic_inv_raw.Location = new System.Drawing.Point(0, 38); + this.gv_fic_inv_raw.Margin = new System.Windows.Forms.Padding(4); this.gv_fic_inv_raw.Name = "gv_fic_inv_raw"; this.gv_fic_inv_raw.ReadOnly = true; + this.gv_fic_inv_raw.RowHeadersWidth = 51; this.gv_fic_inv_raw.RowTemplate.Height = 25; - this.gv_fic_inv_raw.Size = new System.Drawing.Size(540, 400); + this.gv_fic_inv_raw.Size = new System.Drawing.Size(695, 507); this.gv_fic_inv_raw.TabIndex = 2; // // panel2 // - this.panel2.Controls.Add(this.label2); + this.panel2.Controls.Add(this.lbInvRaw); this.panel2.Controls.Add(this.lb_raw_inv_hour); this.panel2.Dock = System.Windows.Forms.DockStyle.Top; this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Margin = new System.Windows.Forms.Padding(4); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(540, 30); + this.panel2.Size = new System.Drawing.Size(695, 38); this.panel2.TabIndex = 1; // - // label2 + // lbInvRaw // - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label2.Location = new System.Drawing.Point(198, 6); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(253, 19); - this.label2.TabIndex = 3; - this.label2.Text = "solar_com0002.s02202000101_inv"; + this.lbInvRaw.AutoSize = true; + this.lbInvRaw.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.lbInvRaw.Location = new System.Drawing.Point(255, 8); + this.lbInvRaw.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lbInvRaw.Name = "lbInvRaw"; + this.lbInvRaw.Size = new System.Drawing.Size(315, 24); + this.lbInvRaw.TabIndex = 3; + this.lbInvRaw.Text = "solar_com0002.s02202000101_inv"; // // lb_raw_inv_hour // this.lb_raw_inv_hour.AutoSize = true; this.lb_raw_inv_hour.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.lb_raw_inv_hour.Location = new System.Drawing.Point(12, 6); + this.lb_raw_inv_hour.Location = new System.Drawing.Point(15, 8); + this.lb_raw_inv_hour.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lb_raw_inv_hour.Name = "lb_raw_inv_hour"; - this.lb_raw_inv_hour.Size = new System.Drawing.Size(123, 19); + this.lb_raw_inv_hour.Size = new System.Drawing.Size(155, 24); this.lb_raw_inv_hour.TabIndex = 2; this.lb_raw_inv_hour.Text = "FIC: inv 原始資料"; // // tb2 // this.tb2.Controls.Add(this.sp_main_station); - this.tb2.Location = new System.Drawing.Point(4, 24); - this.tb2.Margin = new System.Windows.Forms.Padding(2); + this.tb2.Location = new System.Drawing.Point(4, 28); this.tb2.Name = "tb2"; - this.tb2.Padding = new System.Windows.Forms.Padding(2); - this.tb2.Size = new System.Drawing.Size(1348, 820); + this.tb2.Padding = new System.Windows.Forms.Padding(3); + this.tb2.Size = new System.Drawing.Size(1735, 1042); this.tb2.TabIndex = 1; this.tb2.Text = " site "; this.tb2.UseVisualStyleBackColor = true; @@ -393,64 +568,73 @@ namespace solarApp // this.sp_main_station.BackColor = System.Drawing.SystemColors.ActiveCaption; this.sp_main_station.Dock = System.Windows.Forms.DockStyle.Fill; - this.sp_main_station.Location = new System.Drawing.Point(2, 2); - this.sp_main_station.Margin = new System.Windows.Forms.Padding(2); + this.sp_main_station.Location = new System.Drawing.Point(3, 3); this.sp_main_station.Name = "sp_main_station"; // // sp_main_station.Panel1 // + this.sp_main_station.Panel1.Controls.Add(this.label13); this.sp_main_station.Panel1.Controls.Add(this.label12); this.sp_main_station.Panel1.Controls.Add(this.dtselect_station2); this.sp_main_station.Panel1.Controls.Add(this.lbMsg_station); this.sp_main_station.Panel1.Controls.Add(this.bt_find_station); this.sp_main_station.Panel1.Controls.Add(this.dtselect_station1); - this.sp_main_station.Panel1.Controls.Add(this.flowLayoutPanel1); + this.sp_main_station.Panel1.Controls.Add(this.fp_site); // // sp_main_station.Panel2 // this.sp_main_station.Panel2.BackColor = System.Drawing.Color.OldLace; this.sp_main_station.Panel2.Controls.Add(this.sp_child_station); - this.sp_main_station.Size = new System.Drawing.Size(1344, 816); - this.sp_main_station.SplitterDistance = 200; - this.sp_main_station.SplitterWidth = 3; + this.sp_main_station.Size = new System.Drawing.Size(1729, 1036); + this.sp_main_station.SplitterDistance = 257; this.sp_main_station.TabIndex = 0; // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label13.Location = new System.Drawing.Point(6, 363); + this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(110, 24); + this.label13.TabIndex = 13; + this.label13.Text = "請選擇 電站"; + // // label12 // this.label12.AutoSize = true; this.label12.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label12.Location = new System.Drawing.Point(10, 35); + this.label12.Location = new System.Drawing.Point(13, 44); + this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(20, 19); + this.label12.Size = new System.Drawing.Size(24, 24); this.label12.TabIndex = 12; this.label12.Text = "~"; // // dtselect_station2 // this.dtselect_station2.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.dtselect_station2.Location = new System.Drawing.Point(9, 60); - this.dtselect_station2.Margin = new System.Windows.Forms.Padding(2); + this.dtselect_station2.Location = new System.Drawing.Point(12, 76); this.dtselect_station2.Name = "dtselect_station2"; - this.dtselect_station2.Size = new System.Drawing.Size(183, 26); + this.dtselect_station2.Size = new System.Drawing.Size(234, 31); this.dtselect_station2.TabIndex = 10; - this.dtselect_station2.ValueChanged += new System.EventHandler(this.dateTimePicker1_ValueChanged); // // lbMsg_station // this.lbMsg_station.AutoSize = true; this.lbMsg_station.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.lbMsg_station.Location = new System.Drawing.Point(20, 128); + this.lbMsg_station.Location = new System.Drawing.Point(26, 162); + this.lbMsg_station.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lbMsg_station.Name = "lbMsg_station"; - this.lbMsg_station.Size = new System.Drawing.Size(18, 19); + this.lbMsg_station.Size = new System.Drawing.Size(22, 24); this.lbMsg_station.TabIndex = 9; this.lbMsg_station.Text = "..."; // // bt_find_station // - this.bt_find_station.Location = new System.Drawing.Point(9, 98); - this.bt_find_station.Margin = new System.Windows.Forms.Padding(2); + this.bt_find_station.Location = new System.Drawing.Point(12, 124); this.bt_find_station.Name = "bt_find_station"; - this.bt_find_station.Size = new System.Drawing.Size(73, 23); + this.bt_find_station.Size = new System.Drawing.Size(94, 29); this.bt_find_station.TabIndex = 7; this.bt_find_station.Text = "查詢"; this.bt_find_station.UseVisualStyleBackColor = true; @@ -459,42 +643,33 @@ namespace solarApp // dtselect_station1 // this.dtselect_station1.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.dtselect_station1.Location = new System.Drawing.Point(11, 6); - this.dtselect_station1.Margin = new System.Windows.Forms.Padding(2); + this.dtselect_station1.Location = new System.Drawing.Point(14, 8); this.dtselect_station1.Name = "dtselect_station1"; - this.dtselect_station1.Size = new System.Drawing.Size(183, 26); + this.dtselect_station1.Size = new System.Drawing.Size(234, 31); this.dtselect_station1.TabIndex = 6; - this.dtselect_station1.ValueChanged += new System.EventHandler(this.dtselect_station_ValueChanged); // - // flowLayoutPanel1 + // fp_site // - this.flowLayoutPanel1.BackColor = System.Drawing.Color.Azure; - this.flowLayoutPanel1.Controls.Add(this.label13); - this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 307); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(200, 509); - this.flowLayoutPanel1.TabIndex = 8; - // - // label13 - // - this.label13.AutoSize = true; - this.label13.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label13.Location = new System.Drawing.Point(3, 0); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(88, 19); - this.label13.TabIndex = 4; - this.label13.Text = "請選擇 電站"; + this.fp_site.BackColor = System.Drawing.Color.Azure; + this.fp_site.Dock = System.Windows.Forms.DockStyle.Bottom; + this.fp_site.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.fp_site.Location = new System.Drawing.Point(0, 391); + this.fp_site.Margin = new System.Windows.Forms.Padding(4); + this.fp_site.Name = "fp_site"; + this.fp_site.Size = new System.Drawing.Size(257, 645); + this.fp_site.TabIndex = 8; // // sp_child_station // this.sp_child_station.Dock = System.Windows.Forms.DockStyle.Fill; this.sp_child_station.Location = new System.Drawing.Point(0, 0); + this.sp_child_station.Margin = new System.Windows.Forms.Padding(4); this.sp_child_station.Name = "sp_child_station"; // // sp_child_station.Panel1 // + this.sp_child_station.Panel1.Controls.Add(this.gv_web_station_month); + this.sp_child_station.Panel1.Controls.Add(this.panel10); this.sp_child_station.Panel1.Controls.Add(this.gv_web_station_day); this.sp_child_station.Panel1.Controls.Add(this.panel7); this.sp_child_station.Panel1.Controls.Add(this.gv_web_station_hour); @@ -506,24 +681,76 @@ namespace solarApp this.sp_child_station.Panel2.Controls.Add(this.panel5); this.sp_child_station.Panel2.Controls.Add(this.gv_fic_station_raw); this.sp_child_station.Panel2.Controls.Add(this.panel6); - this.sp_child_station.Size = new System.Drawing.Size(1141, 816); - this.sp_child_station.SplitterDistance = 553; - this.sp_child_station.SplitterWidth = 10; + this.sp_child_station.Size = new System.Drawing.Size(1468, 1036); + this.sp_child_station.SplitterDistance = 711; + this.sp_child_station.SplitterWidth = 13; this.sp_child_station.TabIndex = 1; // + // gv_web_station_month + // + this.gv_web_station_month.AllowUserToAddRows = false; + this.gv_web_station_month.AllowUserToDeleteRows = false; + dataGridViewCellStyle6.BackColor = System.Drawing.Color.Azure; + this.gv_web_station_month.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6; + this.gv_web_station_month.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gv_web_station_month.Dock = System.Windows.Forms.DockStyle.Fill; + this.gv_web_station_month.Location = new System.Drawing.Point(0, 913); + this.gv_web_station_month.Margin = new System.Windows.Forms.Padding(4); + this.gv_web_station_month.Name = "gv_web_station_month"; + this.gv_web_station_month.ReadOnly = true; + this.gv_web_station_month.RowHeadersWidth = 51; + this.gv_web_station_month.RowTemplate.Height = 25; + this.gv_web_station_month.Size = new System.Drawing.Size(711, 123); + this.gv_web_station_month.TabIndex = 5; + // + // panel10 + // + this.panel10.Controls.Add(this.label18); + this.panel10.Controls.Add(this.label19); + this.panel10.Dock = System.Windows.Forms.DockStyle.Top; + this.panel10.Location = new System.Drawing.Point(0, 875); + this.panel10.Margin = new System.Windows.Forms.Padding(4); + this.panel10.Name = "panel10"; + this.panel10.Size = new System.Drawing.Size(711, 38); + this.panel10.TabIndex = 4; + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label18.Location = new System.Drawing.Point(230, 8); + this.label18.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(397, 24); + this.label18.TabIndex = 1; + this.label18.Text = "solar_master.power_station_history_month"; + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.label19.Location = new System.Drawing.Point(35, 8); + this.label19.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(162, 24); + this.label19.TabIndex = 0; + this.label19.Text = "web: station 每月"; + // // gv_web_station_day // this.gv_web_station_day.AllowUserToAddRows = false; this.gv_web_station_day.AllowUserToDeleteRows = false; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.Azure; - this.gv_web_station_day.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle7.BackColor = System.Drawing.Color.Azure; + this.gv_web_station_day.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; this.gv_web_station_day.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.gv_web_station_day.Dock = System.Windows.Forms.DockStyle.Fill; - this.gv_web_station_day.Location = new System.Drawing.Point(0, 460); + this.gv_web_station_day.Dock = System.Windows.Forms.DockStyle.Top; + this.gv_web_station_day.Location = new System.Drawing.Point(0, 583); + this.gv_web_station_day.Margin = new System.Windows.Forms.Padding(4); this.gv_web_station_day.Name = "gv_web_station_day"; this.gv_web_station_day.ReadOnly = true; + this.gv_web_station_day.RowHeadersWidth = 51; this.gv_web_station_day.RowTemplate.Height = 25; - this.gv_web_station_day.Size = new System.Drawing.Size(553, 356); + this.gv_web_station_day.Size = new System.Drawing.Size(711, 292); this.gv_web_station_day.TabIndex = 3; // // panel7 @@ -531,18 +758,20 @@ namespace solarApp this.panel7.Controls.Add(this.label10); this.panel7.Controls.Add(this.label11); this.panel7.Dock = System.Windows.Forms.DockStyle.Top; - this.panel7.Location = new System.Drawing.Point(0, 430); + this.panel7.Location = new System.Drawing.Point(0, 545); + this.panel7.Margin = new System.Windows.Forms.Padding(4); this.panel7.Name = "panel7"; - this.panel7.Size = new System.Drawing.Size(553, 30); + this.panel7.Size = new System.Drawing.Size(711, 38); this.panel7.TabIndex = 2; // // label10 // this.label10.AutoSize = true; this.label10.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label10.Location = new System.Drawing.Point(179, 6); + this.label10.Location = new System.Drawing.Point(230, 8); + this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(287, 19); + this.label10.Size = new System.Drawing.Size(368, 24); this.label10.TabIndex = 1; this.label10.Text = "solar_master.power_station_history_day"; // @@ -550,9 +779,10 @@ namespace solarApp // this.label11.AutoSize = true; this.label11.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label11.Location = new System.Drawing.Point(27, 6); + this.label11.Location = new System.Drawing.Point(35, 8); + this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(126, 19); + this.label11.Size = new System.Drawing.Size(162, 24); this.label11.TabIndex = 0; this.label11.Text = "web: station 每天"; // @@ -560,15 +790,17 @@ namespace solarApp // this.gv_web_station_hour.AllowUserToAddRows = false; this.gv_web_station_hour.AllowUserToDeleteRows = false; - dataGridViewCellStyle5.BackColor = System.Drawing.Color.Azure; - this.gv_web_station_hour.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle8.BackColor = System.Drawing.Color.Azure; + this.gv_web_station_hour.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle8; this.gv_web_station_hour.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.gv_web_station_hour.Dock = System.Windows.Forms.DockStyle.Top; - this.gv_web_station_hour.Location = new System.Drawing.Point(0, 30); + this.gv_web_station_hour.Location = new System.Drawing.Point(0, 38); + this.gv_web_station_hour.Margin = new System.Windows.Forms.Padding(4); this.gv_web_station_hour.Name = "gv_web_station_hour"; this.gv_web_station_hour.ReadOnly = true; + this.gv_web_station_hour.RowHeadersWidth = 51; this.gv_web_station_hour.RowTemplate.Height = 25; - this.gv_web_station_hour.Size = new System.Drawing.Size(553, 400); + this.gv_web_station_hour.Size = new System.Drawing.Size(711, 507); this.gv_web_station_hour.TabIndex = 1; // // panel4 @@ -577,17 +809,19 @@ namespace solarApp this.panel4.Controls.Add(this.label6); this.panel4.Dock = System.Windows.Forms.DockStyle.Top; this.panel4.Location = new System.Drawing.Point(0, 0); + this.panel4.Margin = new System.Windows.Forms.Padding(4); this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(553, 30); + this.panel4.Size = new System.Drawing.Size(711, 38); this.panel4.TabIndex = 0; // // label5 // this.label5.AutoSize = true; this.label5.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label5.Location = new System.Drawing.Point(179, 6); + this.label5.Location = new System.Drawing.Point(230, 8); + this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(294, 19); + this.label5.Size = new System.Drawing.Size(379, 24); this.label5.TabIndex = 1; this.label5.Text = "solar_master.power_station_history_hour"; // @@ -595,9 +829,10 @@ namespace solarApp // this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label6.Location = new System.Drawing.Point(27, 6); + this.label6.Location = new System.Drawing.Point(35, 8); + this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(122, 19); + this.label6.Size = new System.Drawing.Size(156, 24); this.label6.TabIndex = 0; this.label6.Text = "web: site 每小時 "; // @@ -605,33 +840,37 @@ namespace solarApp // this.gv_fic_station_day.AllowUserToAddRows = false; this.gv_fic_station_day.AllowUserToDeleteRows = false; - dataGridViewCellStyle6.BackColor = System.Drawing.Color.LightCyan; - this.gv_fic_station_day.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle9.BackColor = System.Drawing.Color.LightCyan; + this.gv_fic_station_day.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9; this.gv_fic_station_day.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.gv_fic_station_day.Dock = System.Windows.Forms.DockStyle.Fill; - this.gv_fic_station_day.Location = new System.Drawing.Point(0, 460); + this.gv_fic_station_day.Location = new System.Drawing.Point(0, 583); + this.gv_fic_station_day.Margin = new System.Windows.Forms.Padding(4); this.gv_fic_station_day.Name = "gv_fic_station_day"; this.gv_fic_station_day.ReadOnly = true; + this.gv_fic_station_day.RowHeadersWidth = 51; this.gv_fic_station_day.RowTemplate.Height = 25; - this.gv_fic_station_day.Size = new System.Drawing.Size(578, 356); + this.gv_fic_station_day.Size = new System.Drawing.Size(744, 453); this.gv_fic_station_day.TabIndex = 4; // // panel5 // this.panel5.Controls.Add(this.label7); this.panel5.Dock = System.Windows.Forms.DockStyle.Top; - this.panel5.Location = new System.Drawing.Point(0, 430); + this.panel5.Location = new System.Drawing.Point(0, 545); + this.panel5.Margin = new System.Windows.Forms.Padding(4); this.panel5.Name = "panel5"; - this.panel5.Size = new System.Drawing.Size(578, 30); + this.panel5.Size = new System.Drawing.Size(744, 38); this.panel5.TabIndex = 3; // // label7 // this.label7.AutoSize = true; this.label7.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label7.Location = new System.Drawing.Point(12, 6); + this.label7.Location = new System.Drawing.Point(15, 8); + this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(119, 19); + this.label7.Size = new System.Drawing.Size(152, 24); this.label7.TabIndex = 2; this.label7.Text = "FIC: station 每天"; // @@ -639,54 +878,58 @@ namespace solarApp // this.gv_fic_station_raw.AllowUserToAddRows = false; this.gv_fic_station_raw.AllowUserToDeleteRows = false; - dataGridViewCellStyle7.BackColor = System.Drawing.Color.LightCyan; - this.gv_fic_station_raw.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle10.BackColor = System.Drawing.Color.LightCyan; + this.gv_fic_station_raw.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10; this.gv_fic_station_raw.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.gv_fic_station_raw.Dock = System.Windows.Forms.DockStyle.Top; - this.gv_fic_station_raw.Location = new System.Drawing.Point(0, 30); + this.gv_fic_station_raw.Location = new System.Drawing.Point(0, 38); + this.gv_fic_station_raw.Margin = new System.Windows.Forms.Padding(4); this.gv_fic_station_raw.Name = "gv_fic_station_raw"; this.gv_fic_station_raw.ReadOnly = true; + this.gv_fic_station_raw.RowHeadersWidth = 51; this.gv_fic_station_raw.RowTemplate.Height = 25; - this.gv_fic_station_raw.Size = new System.Drawing.Size(578, 400); + this.gv_fic_station_raw.Size = new System.Drawing.Size(744, 507); this.gv_fic_station_raw.TabIndex = 2; // // panel6 // - this.panel6.Controls.Add(this.label8); + this.panel6.Controls.Add(this.lbSiteRaw); this.panel6.Controls.Add(this.label9); this.panel6.Dock = System.Windows.Forms.DockStyle.Top; this.panel6.Location = new System.Drawing.Point(0, 0); + this.panel6.Margin = new System.Windows.Forms.Padding(4); this.panel6.Name = "panel6"; - this.panel6.Size = new System.Drawing.Size(578, 30); + this.panel6.Size = new System.Drawing.Size(744, 38); this.panel6.TabIndex = 1; // - // label8 + // lbSiteRaw // - this.label8.AutoSize = true; - this.label8.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label8.Location = new System.Drawing.Point(198, 6); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(279, 19); - this.label8.TabIndex = 3; - this.label8.Text = "solar_com0002.s02202000101_station"; + this.lbSiteRaw.AutoSize = true; + this.lbSiteRaw.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.lbSiteRaw.Location = new System.Drawing.Point(268, 8); + this.lbSiteRaw.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lbSiteRaw.Name = "lbSiteRaw"; + this.lbSiteRaw.Size = new System.Drawing.Size(350, 24); + this.lbSiteRaw.TabIndex = 3; + this.lbSiteRaw.Text = "solar_com0002.s02202000101_station"; // // label9 // this.label9.AutoSize = true; this.label9.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); - this.label9.Location = new System.Drawing.Point(12, 6); + this.label9.Location = new System.Drawing.Point(15, 8); + this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(192, 19); + this.label9.Size = new System.Drawing.Size(245, 24); this.label9.TabIndex = 2; this.label9.Text = "FIC: station 原始資料(hour)"; // // fmMain // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 19F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1356, 848); + this.ClientSize = new System.Drawing.Size(1743, 1074); this.Controls.Add(this.tabControl1); - this.Margin = new System.Windows.Forms.Padding(2); this.Name = "fmMain"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "太陽能電站數據檢核 V0729"; @@ -704,6 +947,12 @@ namespace solarApp this.sp_child_inv.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.sp_child_inv)).EndInit(); this.sp_child_inv.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_inv_month)).EndInit(); + this.panel9.ResumeLayout(false); + this.panel9.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_inv_day)).EndInit(); + this.panel8.ResumeLayout(false); + this.panel8.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.gv_web_inv_hour)).EndInit(); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); @@ -719,12 +968,13 @@ namespace solarApp this.sp_main_station.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.sp_main_station)).EndInit(); this.sp_main_station.ResumeLayout(false); - this.flowLayoutPanel1.ResumeLayout(false); - this.flowLayoutPanel1.PerformLayout(); this.sp_child_station.Panel1.ResumeLayout(false); this.sp_child_station.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.sp_child_station)).EndInit(); this.sp_child_station.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gv_web_station_month)).EndInit(); + this.panel10.ResumeLayout(false); + this.panel10.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.gv_web_station_day)).EndInit(); this.panel7.ResumeLayout(false); this.panel7.PerformLayout(); @@ -748,7 +998,7 @@ namespace solarApp private System.Windows.Forms.TabPage tb2; private System.Windows.Forms.SplitContainer sp_main_inv; private System.Windows.Forms.SplitContainer sp_main_station; - private System.Windows.Forms.Button bt_select1; + private System.Windows.Forms.Button bt_InvSearch; private System.Windows.Forms.DateTimePicker dtselect_inv; private System.Windows.Forms.SplitContainer sp_child_inv; private System.Windows.Forms.DataGridView gv_web_inv_hour; @@ -785,12 +1035,29 @@ namespace solarApp private System.Windows.Forms.Label lbMsg_station; private System.Windows.Forms.Button bt_find_station; private System.Windows.Forms.DateTimePicker dtselect_station; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; - private System.Windows.Forms.Label label13; + private System.Windows.Forms.FlowLayoutPanel fp_site; private System.Windows.Forms.Label lbMsg_inv; private System.Windows.Forms.DateTimePicker dateTimePicker1; private System.Windows.Forms.Label label12; private System.Windows.Forms.DateTimePicker dtselect_station1; private System.Windows.Forms.DateTimePicker dtselect_station2; + private System.Windows.Forms.DataGridView gv_web_inv_day; + private System.Windows.Forms.Panel panel8; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.DataGridView gv_web_inv_month; + private System.Windows.Forms.Panel panel9; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Panel panel10; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.DataGridView gv_web_station_month; + private System.Windows.Forms.Label lbSiteID_inv; + private System.Windows.Forms.Label lbSiteName_inv; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label lbSiteDB_inv; + private System.Windows.Forms.Label lbSiteRaw; + private System.Windows.Forms.Label lbInvRaw; } } \ No newline at end of file diff --git a/solarApp/fmMain.cs b/solarApp/fmMain.cs index 9e7d898..5336da0 100644 --- a/solarApp/fmMain.cs +++ b/solarApp/fmMain.cs @@ -23,13 +23,17 @@ namespace solarApp private async void button1_Click(object sender, EventArgs e) { lbMsg_inv.Text = "loading ... "; + string date1 = dtselect_inv.Value.ToString("yyyy-MM-dd"); + gv_fic_inv_raw.DataSource = inv_svc.Get_rawInv(date1, lbInverterID.Text, lbSiteDB_inv.Text, lbSiteID_inv.Text); + + gv_fic_inv_hour.DataSource = inv_svc.get_Inv_rawAvg(date1, lbInverterID.Text, lbSiteDB_inv.Text, lbSiteID_inv.Text); + + gv_web_inv_hour.DataSource = inv_svc.get_web_Inv_hour(date1, lbInverterID.Text); + + gv_web_inv_day.DataSource = inv_svc.get_web_Inv_day(date1, lbInverterID.Text); + + gv_web_inv_month.DataSource = inv_svc.get_web_Inv_month( date1.Substring(0, 7), lbInverterID.Text); - gv_fic_inv_raw.DataSource = inv_svc.Get_rawInv(dtselect_inv.Value.ToString("yyyy-MM-dd"), lbInverterID.Text); - - gv_fic_inv_hour.DataSource = inv_svc.get_Inv_rawAvg(dtselect_inv.Value.ToString("yyyy-MM-dd"), lbInverterID.Text); - - gv_web_inv_hour.DataSource = inv_svc.get_web_Inv_hour(dtselect_inv.Value.ToString("yyyy-MM-dd"), lbInverterID.Text); - lbMsg_inv.Text = " done " + System.DateTime.Now.ToShortTimeString(); } @@ -40,13 +44,58 @@ namespace solarApp dtselect_station2.Value = DateTime.Today.AddDays(-1); dtselect_inv.Value = DateTime.Today.AddDays(-1); - Cursor.Current = Cursors.Default; - add_inv_list(); + // Cursor.Current = Cursors.Default; + + + tabControl1.SelectedTab = tabControl1.TabPages[1]; + + #region 電站清單 + int i = 0; + var site_list = stationSvc.get_station_list(); + foreach (var item in site_list) + { + RadioButton rb = new RadioButton(); + rb.Name = item.SiteID; + rb.Text = item.SiteName; + rb.Tag = item.SiteDB; + rb.Font = new Font(Font.FontFamily, 22); + rb.AutoSize = true; + rb.CheckedChanged += new EventHandler(rb_site_CheckedChanged); + fp_site.Controls.Add(rb); + if (i == 0) rb.Checked = true; + i++; + } + #endregion + + + #region 顯示逆變器list + //add_inv_list(); + #endregion } - void add_inv_list() { - //fp_inv - var inv_list = inv_svc.get_Inv_list(); + private void rb_site_CheckedChanged(object sender, EventArgs e) + { + RadioButton rb = sender as RadioButton; + if (rb.Checked) + { + lbSiteDB_inv.Text = rb.Tag.ToString(); + lbSiteName_inv.Text = rb.Text; + lbSiteID_inv.Text = rb.Name; + //顯示 table name on label + lbSiteRaw.Text = lbSiteName_inv.Text + " "+ lbSiteDB_inv.Text + ".s" + lbSiteID_inv.Text + "_Station"; + lbInvRaw.Text = lbSiteName_inv.Text + " " + lbSiteDB_inv.Text + ".s" + lbSiteID_inv.Text + "_Inv"; + add_inv_list(lbSiteDB_inv.Text, lbSiteID_inv.Text.Substring(0, 9)); + } + } + + /// + /// 顯示 Inventer 提供選擇 + /// + /// + /// + void add_inv_list(string siteDB, string siteID) { + fp_inv.Controls.Clear(); + var inv_list = inv_svc.get_Inv_list(siteDB, siteID); int i = 0; foreach (var item in inv_list) { @@ -62,75 +111,6 @@ namespace solarApp } } - void init_GridView() { - // Create an unbound DataGridView by declaring a column count. - //gv_fic_inv_raw.ColumnCount = 6; - - //// Set the column header style. - //DataGridViewCellStyle columnHeaderStyle = new DataGridViewCellStyle(); - - ////columnHeaderStyle.BackColor = Color.Beige; - ////columnHeaderStyle.Font = new Font("Verdana", 10, FontStyle.Bold); - ////dataGridView1.ColumnHeadersDefaultCellStyle = columnHeaderStyle; - - //// Set the column header names. - //gv_fic_inv_raw.Columns[0].Name = "INVERTERID"; - //gv_fic_inv_raw.Columns[1].Name = "reportdate"; - //gv_fic_inv_raw.Columns[2].Name = "WH"; - //gv_fic_inv_raw.Columns[3].Name = "TODAYKWH"; - //gv_fic_inv_raw.Columns[4].Name = "TOTALKWH"; - //gv_fic_inv_raw.Columns[5].Name = "PR"; - - //DataGridViewColumn newCol1 = new DataGridViewColumn(); // add a column to the grid - //DataGridViewCell cell = new DataGridViewCell(); //Specify which type of cell in this column - //newCol.CellTemplate = cell; - - for (int i = 0; i < 6; i++) - { - DataGridViewColumn newCol = new DataGridViewColumn(); // add a column to the grid - DataGridViewCell cell = new DataGridViewTextBoxCell(); //Specify which type of cell in this column - newCol.CellTemplate = cell; - switch (i) - { - case 0: - newCol.HeaderText = "INVERTERID"; - newCol.Name = "INVERTERID"; - newCol.Visible = true; - newCol.Width = 40; break; - case 1: - newCol.HeaderText = "reportdate"; - newCol.Name = "reportdate"; - newCol.Visible = true; - newCol.Width = 40; break; - case 2: - newCol.HeaderText = "WH"; - newCol.Name = "WH"; - newCol.Visible = true; - newCol.Width = 40; break; - case 3: - newCol.HeaderText = "TODAYKWH"; - newCol.Name = "TODAYKWH"; - newCol.Visible = true; - newCol.Width = 40; break; - case 4: - newCol.HeaderText = "TOTALKWH"; - newCol.Name = "TOTALKWH"; - newCol.Visible = true; - newCol.Width = 40; break; - case 5: - newCol.HeaderText = "PR"; - newCol.Name = "PR"; - newCol.Visible = true; - newCol.Width = 40; break; - case 6: - newCol.HeaderText = "ct"; - newCol.Name = "ct"; - newCol.Visible = false; - newCol.Width = 40; break; - } - gv_fic_inv_raw.Columns.Add(newCol); - } - } private void radio_inv_click(object sender, EventArgs e) { @@ -158,10 +138,6 @@ namespace solarApp //} } - private void fmMain_Shown(object sender, EventArgs e) - { - - } private void dtselect_ValueChanged(object sender, EventArgs e) { @@ -180,30 +156,18 @@ namespace solarApp string date1 = dtselect_station1.Value.ToString("yyyy-MM-dd"); string date2 = dtselect_station2.Value.ToString("yyyy-MM-dd"); - gv_fic_station_raw.DataSource = stationSvc.get_station_raw(date1); + gv_fic_station_raw.DataSource = stationSvc.get_station_raw(date1, lbSiteDB_inv.Text, lbSiteID_inv.Text); - gv_fic_station_day.DataSource = stationSvc.get_station_rawAvg(date1, date2); + gv_fic_station_day.DataSource = stationSvc.get_station_rawAvg(date1, date2, lbSiteDB_inv.Text, lbSiteID_inv.Text); gv_web_station_hour.DataSource = stationSvc.get_web_station_hour( date1 ); gv_web_station_day.DataSource = stationSvc.get_web_station_day(date1, date2); + gv_web_station_month.DataSource = stationSvc.get_web_station_month(date1.Substring(0, 7), date2.Substring(0, 7)); + + lbMsg_station.Text = " done " + System.DateTime.Now.ToShortTimeString(); - } - - private void dtselect_station_ValueChanged(object sender, EventArgs e) - { - - } - - private void dateTimePicker1_ValueChanged(object sender, EventArgs e) - { - - } - - private void label12_Click(object sender, EventArgs e) - { - - } + } } }