1.歸檔流程 - 獨立立昌
2.報表匯出功能, Null 異常修復
This commit is contained in:
parent
9475fff227
commit
02e0245c92
@ -484,9 +484,30 @@ namespace SolarPower.Controllers
|
|||||||
if (vForDataCount < (Formbody.Result.Data.Count - 1))//最後一筆(總計),不須取值
|
if (vForDataCount < (Formbody.Result.Data.Count - 1))//最後一筆(總計),不須取值
|
||||||
{
|
{
|
||||||
vForDataCount++;
|
vForDataCount++;
|
||||||
avghour = (Convert.ToDouble(dbody["tothour"].ToString()) + Convert.ToDouble(avghour)).ToString();
|
object vv = "";
|
||||||
avgKWHKWP = (Convert.ToDouble(dbody["KWHKWP"].ToString()) + Convert.ToDouble(avgKWHKWP)).ToString();
|
|
||||||
avgdayKWH = (Convert.ToDouble(dbody["dayKWH"].ToString()) + Convert.ToDouble(avgdayKWH)).ToString();
|
avghour = Convert.ToString( dbody["tothour"]) ?? "NaN";
|
||||||
|
avgKWHKWP = Convert.ToString(dbody["KWHKWP"]) ?? "NaN";
|
||||||
|
avgKWHKWP = Convert.ToString(dbody["dayKWH"]) ?? "NaN";
|
||||||
|
|
||||||
|
//if (dbody.TryGetValue("tothour", out vv))
|
||||||
|
// avghour = (Convert.ToDouble(dbody["tothour"].ToString()) + Convert.ToDouble(avghour)).ToString();
|
||||||
|
//else
|
||||||
|
// avghour = "NaN";
|
||||||
|
|
||||||
|
//if (dbody.TryGetValue("KWHKWP", out vv))
|
||||||
|
// avgKWHKWP = (Convert.ToDouble(dbody["KWHKWP"].ToString()) + Convert.ToDouble(avgKWHKWP)).ToString();
|
||||||
|
//else
|
||||||
|
// avgKWHKWP = "NaN";
|
||||||
|
|
||||||
|
//if (dbody.TryGetValue("dayKWH", out vv))
|
||||||
|
// avgKWHKWP = (Convert.ToDouble(dbody["dayKWH"].ToString()) + Convert.ToDouble(avgdayKWH)).ToString();
|
||||||
|
//else
|
||||||
|
// avgKWHKWP = "NaN";
|
||||||
|
|
||||||
|
//avghour = (Convert.ToDouble(dbody["tothour"].ToString()) + Convert.ToDouble(avghour)).ToString();
|
||||||
|
//avgKWHKWP = (Convert.ToDouble(dbody["KWHKWP"].ToString()) + Convert.ToDouble(avgKWHKWP)).ToString();
|
||||||
|
//avgdayKWH = (Convert.ToDouble(dbody["dayKWH"].ToString()) + Convert.ToDouble(avgdayKWH)).ToString();
|
||||||
monthKWH = dbody["monthKWH"] == null ? "0" : dbody["monthKWH"].ToString();
|
monthKWH = dbody["monthKWH"] == null ? "0" : dbody["monthKWH"].ToString();
|
||||||
monthmoney = dbody["monthmoney"] == null ? "0" : dbody["monthmoney"].ToString();
|
monthmoney = dbody["monthmoney"] == null ? "0" : dbody["monthmoney"].ToString();
|
||||||
monthmoneyone = dbody["monthmoneyone"] == null ? "0" : dbody["monthmoneyone"].ToString();
|
monthmoneyone = dbody["monthmoneyone"] == null ? "0" : dbody["monthmoneyone"].ToString();
|
||||||
|
|||||||
@ -331,7 +331,7 @@ namespace solarApp.Service
|
|||||||
{
|
{
|
||||||
//System.Diagnostics.Debug.WriteLine("【ArchiveRowData】[搬移資料失敗】");
|
//System.Diagnostics.Debug.WriteLine("【ArchiveRowData】[搬移資料失敗】");
|
||||||
TimeSpan duration = DateTime.Now - dt_start1;
|
TimeSpan duration = DateTime.Now - dt_start1;
|
||||||
arclog.insert_log(_powerStationID, "move raw s1", duration.TotalSeconds, $"{_siteDB}.s{_siteID}_station", $"{_siteDB}_history.s{_siteID}_station", "1", ex.Message, "0", conn, null);
|
arclog.insert_log(_powerStationID, @$"move raw s1-{move_month}", duration.TotalSeconds, $"{_siteDB}.s{_siteID}_station", $"{_siteDB}_history.s{_siteID}_station", "1", ex.Message, "0", conn, null);
|
||||||
|
|
||||||
throw ex;
|
throw ex;
|
||||||
}
|
}
|
||||||
@ -366,7 +366,7 @@ namespace solarApp.Service
|
|||||||
//System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】{_siteDB}.s{_siteID}_inv的七月前資料寫入至{_siteDB}_history.s{_siteID}_inv【寫入成功】於{dateTime}");
|
//System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】{_siteDB}.s{_siteID}_inv的七月前資料寫入至{_siteDB}_history.s{_siteID}_inv【寫入成功】於{dateTime}");
|
||||||
// log
|
// log
|
||||||
TimeSpan duration = DateTime.Now - dt_start1;
|
TimeSpan duration = DateTime.Now - dt_start1;
|
||||||
arclog.insert_log(_powerStationID, "move raw s1", duration.TotalSeconds, $"{_siteDB}.s{_siteID01}_inv", $"{_siteDB}_history.s{_siteID01}_inv", "0", "", rowCT.ToString(), conn, null);
|
arclog.insert_log(_powerStationID, @$"move raw s1 - {move_month}", duration.TotalSeconds, $"{_siteDB}.s{_siteID01}_inv", $"{_siteDB}_history.s{_siteID01}_inv", "0", "", rowCT.ToString(), conn, null);
|
||||||
//arclog.insert_log(_powerStationID, "sensor step1", duration.TotalSeconds, "sensor_history_hour", "insert sensor hour", "0", "", rowCT.ToString(), conn, cmd);
|
//arclog.insert_log(_powerStationID, "sensor step1", duration.TotalSeconds, "sensor_history_hour", "insert sensor hour", "0", "", rowCT.ToString(), conn, cmd);
|
||||||
dt_start1 = DateTime.Now;
|
dt_start1 = DateTime.Now;
|
||||||
|
|
||||||
@ -375,12 +375,12 @@ namespace solarApp.Service
|
|||||||
rowCT = conn.Execute(for_delete_inv, commandTimeout: 6000);
|
rowCT = conn.Execute(for_delete_inv, commandTimeout: 6000);
|
||||||
//System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】{_siteDB}.s{_siteID}_sensoravg搬移至{_siteDB}_history.s{_siteID}_sensoravg【搬移資料成功】於{dateTime} 共 {delete_inv.ToString()} 筆");
|
//System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】{_siteDB}.s{_siteID}_sensoravg搬移至{_siteDB}_history.s{_siteID}_sensoravg【搬移資料成功】於{dateTime} 共 {delete_inv.ToString()} 筆");
|
||||||
duration = DateTime.Now - dt_start1;
|
duration = DateTime.Now - dt_start1;
|
||||||
arclog.insert_log(_powerStationID, "delete raw s2", duration.TotalSeconds, $"{_siteDB}.s{_siteID01}_inv", "", "0", "", rowCT.ToString(), conn, null);
|
arclog.insert_log(_powerStationID, @$"delete raw s2 - {move_month}", duration.TotalSeconds, $"{_siteDB}.s{_siteID01}_inv", "", "0", "", rowCT.ToString(), conn, null);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
TimeSpan duration = DateTime.Now - dt_start1;
|
TimeSpan duration = DateTime.Now - dt_start1;
|
||||||
arclog.insert_log(_powerStationID, "move raw s1", duration.TotalSeconds, $"{_siteDB}.s{_siteID01}_station", $"{_siteDB}_history.s{_siteID01}_station", "1", ex.Message, "0", conn, null);
|
arclog.insert_log(_powerStationID, @$"move raw s1 - {move_month}", duration.TotalSeconds, $"{_siteDB}.s{_siteID01}_station", $"{_siteDB}_history.s{_siteID01}_station", "1", ex.Message, "err", conn, null);
|
||||||
//arclog.insert_log(_powerStationID, "sensor step1", duration.TotalSeconds, "sensor_history_hour", "insert sensor hour", "0", "", rowCT.ToString(), conn, cmd);
|
//arclog.insert_log(_powerStationID, "sensor step1", duration.TotalSeconds, "sensor_history_hour", "insert sensor hour", "0", "", rowCT.ToString(), conn, cmd);
|
||||||
throw ex;
|
throw ex;
|
||||||
}
|
}
|
||||||
@ -411,20 +411,20 @@ namespace solarApp.Service
|
|||||||
int rowCT = conn.Execute(for_insert_sensoravg, commandTimeout: 600);
|
int rowCT = conn.Execute(for_insert_sensoravg, commandTimeout: 600);
|
||||||
// log
|
// log
|
||||||
TimeSpan duration = DateTime.Now - dt_start1;
|
TimeSpan duration = DateTime.Now - dt_start1;
|
||||||
arclog.insert_log(_powerStationID, "move raw s1", duration.TotalSeconds, $"{_siteDB}.s{_siteID01}_sensoravg", $"{_siteDB}_history.s{_siteID01}_sensoravg", "0", "", rowCT.ToString(), conn, null);
|
arclog.insert_log(_powerStationID, @$"move raw s1 - {move_month}", duration.TotalSeconds, $"{_siteDB}.s{_siteID01}_sensoravg", $"{_siteDB}_history.s{_siteID01}_sensoravg", "0", "", rowCT.ToString(), conn, null);
|
||||||
dt_start1 = DateTime.Now;
|
dt_start1 = DateTime.Now;
|
||||||
|
|
||||||
string for_delete_sensoravg = $@"DELETE FROM {_siteDB}.s{_siteID01}_sensoravg WHERE LEFT(crdTime, 7) < '{move_month}'";
|
string for_delete_sensoravg = $@"DELETE FROM {_siteDB}.s{_siteID01}_sensoravg WHERE LEFT(crdTime, 7) < '{move_month}'";
|
||||||
rowCT = conn.Execute(for_delete_sensoravg, commandTimeout: 600);
|
rowCT = conn.Execute(for_delete_sensoravg, commandTimeout: 600);
|
||||||
|
|
||||||
duration = DateTime.Now - dt_start1;
|
duration = DateTime.Now - dt_start1;
|
||||||
arclog.insert_log(_powerStationID, "delete raw s2", duration.TotalSeconds, $"{_siteDB}.s{_siteID01}_sensoravg", "", "0", "", rowCT.ToString(), conn, null);
|
arclog.insert_log(_powerStationID, @$"delete raw s2 - {move_month}", duration.TotalSeconds, $"{_siteDB}.s{_siteID01}_sensoravg", "", "0", "", rowCT.ToString(), conn, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
TimeSpan duration = DateTime.Now - dt_start1;
|
TimeSpan duration = DateTime.Now - dt_start1;
|
||||||
arclog.insert_log(_powerStationID, "move raw s1", duration.TotalSeconds, $"{_siteDB}.s{_siteID01}_sensoravg", $"{_siteDB}_history.s{_siteID01}_sensoravg", "1", ex.Message, "0", conn, null);
|
arclog.insert_log(_powerStationID, @$"move raw s1 - {move_month}", duration.TotalSeconds, $"{_siteDB}.s{_siteID01}_sensoravg", $"{_siteDB}_history.s{_siteID01}_sensoravg", "1", ex.Message, "0", conn, null);
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -194,13 +194,36 @@ namespace solarApp.Service
|
|||||||
string sql = @" select id, CompanyId, `code` , SerialNumber, CONCAT(`code` ,'01') SiteID, SiteDB, `name` SiteName
|
string sql = @" select id, CompanyId, `code` , SerialNumber, CONCAT(`code` ,'01') SiteID, SiteDB, `name` SiteName
|
||||||
from power_station
|
from power_station
|
||||||
where deleted = 0 and `status`= 1
|
where deleted = 0 and `status`= 1
|
||||||
ORDER BY GeneratingCapacity ";
|
ORDER BY id ";
|
||||||
// id <> 14";and id > 24
|
// id <> 14";and id > 24
|
||||||
List<station_list> ds = conn.Query<station_list>(sql).AsList<station_list>();
|
List<station_list> ds = conn.Query<station_list>(sql).AsList<station_list>();
|
||||||
conn.Close();
|
conn.Close();
|
||||||
return ds;
|
return ds;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<station_list> get_station_list32(bool include32)
|
||||||
|
{
|
||||||
|
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 deleted = 0 and `status`= 1 and id <> 32 ";
|
||||||
|
if (include32)
|
||||||
|
{
|
||||||
|
sql = @" select id, CompanyId, `code` , SerialNumber, CONCAT(`code` ,'01') SiteID, SiteDB, `name` SiteName
|
||||||
|
from power_station
|
||||||
|
where deleted = 0 and `status`= 1 and id = 32";
|
||||||
|
}
|
||||||
|
|
||||||
|
// id <> 14";and id > 24
|
||||||
|
List<station_list> ds = conn.Query<station_list>(sql).AsList<station_list>();
|
||||||
|
conn.Close();
|
||||||
|
return ds;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public List<PowerStation> get_powerStation()
|
public List<PowerStation> get_powerStation()
|
||||||
{
|
{
|
||||||
using (MySqlConnection conn = new MySqlConnection(Connection1))
|
using (MySqlConnection conn = new MySqlConnection(Connection1))
|
||||||
|
|||||||
@ -562,7 +562,7 @@ namespace solarApp.Service
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
arclog.insert_log(_powerStationID, "sensor step1 ", 0, "sensor_history_", "insert sensor error", "0", "", "", conn, cmd);
|
arclog.insert_log(_powerStationID, "sensor step1 ", 0, "sensor_history_", "insert sensor error", "err", "", "", conn, cmd);
|
||||||
|
|
||||||
//throw ex;
|
//throw ex;
|
||||||
}
|
}
|
||||||
@ -628,7 +628,7 @@ namespace solarApp.Service
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
arclog.insert_log(_powerStationID, "sensor step1 irrDayHour", 0, "sensor_history_", "sensor_history_hour error", "0", "", "", conn, cmd);
|
arclog.insert_log(_powerStationID, "sensor step1 irrDayHour", 0, "sensor_history_", "sensor_history_hour error", "err", "", "", conn, cmd);
|
||||||
//throw ex;
|
//throw ex;
|
||||||
}
|
}
|
||||||
conn.Close();
|
conn.Close();
|
||||||
@ -716,7 +716,7 @@ namespace solarApp.Service
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//throw ex;
|
//throw ex;
|
||||||
arclog.insert_log(_powerStationID, "sensor step1 meter_hour", 0, "meter_history_hour", "meter_history_hour error", "0", "", "", conn, null);
|
arclog.insert_log(_powerStationID, "sensor step1 meter_hour", 0, "meter_history_hour", "meter_history_hour error", "err", "", "", conn, null);
|
||||||
}
|
}
|
||||||
conn.Close();
|
conn.Close();
|
||||||
}
|
}
|
||||||
|
|||||||
1133
solarApp/fmArchive.Designer.cs
generated
1133
solarApp/fmArchive.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -64,7 +64,7 @@ namespace solarApp
|
|||||||
|
|
||||||
private void fmArchive_Load(object sender, EventArgs e)
|
private void fmArchive_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// MessageBox.Show(" loading ");
|
// MessageBox.Show(" loading ");
|
||||||
#region 電站清單
|
#region 電站清單
|
||||||
int i = 0;
|
int i = 0;
|
||||||
var site_list = stationSvc.get_station_list();
|
var site_list = stationSvc.get_station_list();
|
||||||
@ -194,7 +194,7 @@ namespace solarApp
|
|||||||
if (System.DateTime.Now.Day == 20 && System.DateTime.Now.Hour == 20 && DateTime.Now.Minute == 00
|
if (System.DateTime.Now.Day == 20 && System.DateTime.Now.Hour == 20 && DateTime.Now.Minute == 00
|
||||||
&& (DateTime.Now.Second >= 0 && DateTime.Now.Second <= 20)
|
&& (DateTime.Now.Second >= 0 && DateTime.Now.Second <= 20)
|
||||||
&& autoTask == false)
|
&& autoTask == false)
|
||||||
{
|
{
|
||||||
autoTask = true;
|
autoTask = true;
|
||||||
bt_MoveRawData.PerformClick();
|
bt_MoveRawData.PerformClick();
|
||||||
autoTask = false;
|
autoTask = false;
|
||||||
@ -202,16 +202,16 @@ namespace solarApp
|
|||||||
//var site_list = stationSvc.get_station_list();
|
//var site_list = stationSvc.get_station_list();
|
||||||
|
|
||||||
//archiveLowData archiveData = new archiveLowData();
|
//archiveLowData archiveData = new archiveLowData();
|
||||||
|
|
||||||
//bt_MoveRawData_Click
|
//bt_MoveRawData_Click
|
||||||
|
|
||||||
//foreach (var item in site_list)
|
//foreach (var item in site_list)
|
||||||
//{
|
//{
|
||||||
// archiveData.archiveData(item.SiteID.Substring(0, 9));
|
// archiveData.archiveData(item.SiteID.Substring(0, 9));
|
||||||
|
|
||||||
// i++;
|
// i++;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
lbMsgTitle.Text = System.DateTime.Now.ToString() + " 水位管理 - 資料搬移完成!";
|
lbMsgTitle.Text = System.DateTime.Now.ToString() + " 水位管理 - 資料搬移完成!";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -220,7 +220,7 @@ namespace solarApp
|
|||||||
{
|
{
|
||||||
RadioButton rb = sender as RadioButton;
|
RadioButton rb = sender as RadioButton;
|
||||||
if (rb.Checked)
|
if (rb.Checked)
|
||||||
{
|
{
|
||||||
lbSiteName_sensor.Text = rb.Text;
|
lbSiteName_sensor.Text = rb.Text;
|
||||||
lbSiteDB_sensor.Text = rb.Tag.ToString();
|
lbSiteDB_sensor.Text = rb.Tag.ToString();
|
||||||
lbSiteID_sensor.Text = rb.Name;
|
lbSiteID_sensor.Text = rb.Name;
|
||||||
@ -338,27 +338,37 @@ namespace solarApp
|
|||||||
|
|
||||||
private void bt_archive_Click(object sender, EventArgs e)
|
private void bt_archive_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var site_list = stationSvc.get_station_list();
|
var site_list = stationSvc.get_station_list32(false); // 不含 32
|
||||||
|
//var site_list = stationSvc.get_station_list32(true); // 不含 32
|
||||||
string date1 = dtSelect1.Value.ToString("yyyy-MM-dd");
|
|
||||||
string date2 = dtSelect2.Value.ToString("yyyy-MM-dd");
|
string date1 = dtSelect1.Value.ToString("yyyy-MM-dd");
|
||||||
|
string date2 = dtSelect2.Value.ToString("yyyy-MM-dd");
|
||||||
procSensorSvc sensorSvc = new procSensorSvc();
|
procSensorSvc sensorSvc = new procSensorSvc();
|
||||||
procInvSvc invSvc = new procInvSvc();
|
procInvSvc invSvc = new procInvSvc();
|
||||||
procStationSvc siteSvc = new procStationSvc();
|
procStationSvc siteSvc = new procStationSvc();
|
||||||
|
archiveRawData(site_list, date1, date2, sensorSvc, invSvc, siteSvc);
|
||||||
|
|
||||||
|
//單獨製作 32
|
||||||
|
site_list = stationSvc.get_station_list32(true); // 不含 32
|
||||||
|
archiveRawData(site_list, date1, date2, sensorSvc, invSvc, siteSvc);
|
||||||
|
|
||||||
|
lbMsgTitle.Text = System.DateTime.Now.ToString() + " 完成!";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void archiveRawData(List<station_list> site_list, string date1, string date2, procSensorSvc sensorSvc, procInvSvc invSvc, procStationSvc siteSvc)
|
||||||
|
{
|
||||||
foreach (var item in site_list)
|
foreach (var item in site_list)
|
||||||
{
|
{
|
||||||
//RadioButton rb = new RadioButton();
|
RadioButton rb = new RadioButton();
|
||||||
//rb.Name = item.SiteID;
|
rb.Name = item.SiteID;
|
||||||
//rb.Text = item.SiteName;
|
rb.Text = item.SiteName;
|
||||||
//rb.Tag = item.SiteDB;
|
rb.Tag = item.SiteDB;
|
||||||
//foreach (DateTime day in EachDay(DateTime.Parse(date1), DateTime.Parse(date2)))
|
foreach (DateTime day in EachDay(DateTime.Parse(date1), DateTime.Parse(date2)))
|
||||||
//{
|
{
|
||||||
// sensorSvc.archiveData(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd"));
|
sensorSvc.archiveData(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd"));
|
||||||
// invSvc.archiveData(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd"));
|
invSvc.archiveData(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd"));
|
||||||
// siteSvc.archiveData(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd"));
|
siteSvc.archiveData(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd"));
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
sensorSvc.isFirst = true;
|
sensorSvc.isFirst = true;
|
||||||
foreach (var item in site_list)
|
foreach (var item in site_list)
|
||||||
@ -371,8 +381,6 @@ namespace solarApp
|
|||||||
invSvc.report_invDay(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd"));
|
invSvc.report_invDay(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lbMsgTitle.Text = System.DateTime.Now.ToString() + " 完成!";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void bt_clear_sensor_Click(object sender, EventArgs e)
|
private void bt_clear_sensor_Click(object sender, EventArgs e)
|
||||||
@ -416,11 +424,11 @@ namespace solarApp
|
|||||||
private void bt_rpt_invDay_Click(object sender, EventArgs e)
|
private void bt_rpt_invDay_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string date1 = dtSelect1.Value.ToString("yyyy-MM-dd");
|
string date1 = dtSelect1.Value.ToString("yyyy-MM-dd");
|
||||||
string date2 = dtSelect2.Value.ToString("yyyy-MM-dd");
|
string date2 = dtSelect2.Value.ToString("yyyy-MM-dd");
|
||||||
procInvSvc invSvc = new procInvSvc();
|
procInvSvc invSvc = new procInvSvc();
|
||||||
|
|
||||||
foreach (DateTime day in EachDay(DateTime.Parse(date1), DateTime.Parse(date2)))
|
foreach (DateTime day in EachDay(DateTime.Parse(date1), DateTime.Parse(date2)))
|
||||||
{
|
{
|
||||||
invSvc.report_invDay(lbSiteID_sensor.Text.Substring(0, 9), day.ToString("yyyy-MM-dd"));
|
invSvc.report_invDay(lbSiteID_sensor.Text.Substring(0, 9), day.ToString("yyyy-MM-dd"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -433,9 +441,9 @@ namespace solarApp
|
|||||||
string date1 = dtSelect1.Value.ToString("yyyy-MM-dd");
|
string date1 = dtSelect1.Value.ToString("yyyy-MM-dd");
|
||||||
string date2 = dtSelect2.Value.ToString("yyyy-MM-dd");
|
string date2 = dtSelect2.Value.ToString("yyyy-MM-dd");
|
||||||
get_inv_svc invSvc = new get_inv_svc();
|
get_inv_svc invSvc = new get_inv_svc();
|
||||||
var ds = invSvc.get_ck_invDay_list(date1, date2);
|
var ds = invSvc.get_ck_invDay_list(date1, date2);
|
||||||
gv_rpt_invDay.DataSource = ds;
|
gv_rpt_invDay.DataSource = ds;
|
||||||
gv_rpt_invDay.Columns[0].Width = 60;
|
gv_rpt_invDay.Columns[0].Width = 60;
|
||||||
gv_rpt_invDay.Columns[1].Width = 80;
|
gv_rpt_invDay.Columns[1].Width = 80;
|
||||||
gv_rpt_invDay.Columns[2].Width = 100;
|
gv_rpt_invDay.Columns[2].Width = 100;
|
||||||
gv_rpt_invDay.Columns[3].Width = 90;
|
gv_rpt_invDay.Columns[3].Width = 90;
|
||||||
@ -474,16 +482,17 @@ namespace solarApp
|
|||||||
string date2 = dtSelect2.Value.ToString("yyyy-MM-dd");
|
string date2 = dtSelect2.Value.ToString("yyyy-MM-dd");
|
||||||
get_inv_svc invSvc = new get_inv_svc();
|
get_inv_svc invSvc = new get_inv_svc();
|
||||||
if (e.ColumnIndex != 8)
|
if (e.ColumnIndex != 8)
|
||||||
{
|
{
|
||||||
var ds = invSvc.get_ck_invDay_detail1(powerStationID, date1, date2);
|
var ds = invSvc.get_ck_invDay_detail1(powerStationID, date1, date2);
|
||||||
gv_inv_detail.DataSource = ds;
|
gv_inv_detail.DataSource = ds;
|
||||||
gv_inv_detail.Columns[0].Width = 60;
|
gv_inv_detail.Columns[0].Width = 60;
|
||||||
gv_inv_detail.Columns[1].Width = 160; //invID
|
gv_inv_detail.Columns[1].Width = 160; //invID
|
||||||
gv_inv_detail.Columns[2].Width = 80;
|
gv_inv_detail.Columns[2].Width = 80;
|
||||||
gv_inv_detail.Columns[3].Width = 90;
|
gv_inv_detail.Columns[3].Width = 90;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{ // 日報
|
{ // 日報
|
||||||
var ds = invSvc.get_reportDay(powerStationID, date1, date2);
|
var ds = invSvc.get_reportDay(powerStationID, date1, date2);
|
||||||
gv_inv_detail.DataSource = ds;
|
gv_inv_detail.DataSource = ds;
|
||||||
gv_inv_detail.Columns[0].Width = 60;
|
gv_inv_detail.Columns[0].Width = 60;
|
||||||
gv_inv_detail.Columns[1].Width = 80; //report_date
|
gv_inv_detail.Columns[1].Width = 80; //report_date
|
||||||
@ -492,7 +501,7 @@ namespace solarApp
|
|||||||
gv_inv_detail.Columns[4].Width = 70;
|
gv_inv_detail.Columns[4].Width = 70;
|
||||||
gv_inv_detail.Columns[5].Width = 70;
|
gv_inv_detail.Columns[5].Width = 70;
|
||||||
gv_inv_detail.Columns[6].Width = 70;
|
gv_inv_detail.Columns[6].Width = 70;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//switch (e.ColumnIndex)
|
//switch (e.ColumnIndex)
|
||||||
//{
|
//{
|
||||||
@ -506,7 +515,7 @@ namespace solarApp
|
|||||||
|
|
||||||
private void gv_inv_detail_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
private void gv_inv_detail_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||||
{
|
{
|
||||||
if (gv_inv_detail.Columns.Count == 5 || e.RowIndex == -1) return;
|
if (gv_inv_detail.Columns.Count == 5 || e.RowIndex == -1) return;
|
||||||
|
|
||||||
string inverterID = gv_inv_detail.Rows[e.RowIndex].Cells[1].Value.ToString();
|
string inverterID = gv_inv_detail.Rows[e.RowIndex].Cells[1].Value.ToString();
|
||||||
//MessageBox.Show(inverterID);
|
//MessageBox.Show(inverterID);
|
||||||
@ -522,7 +531,7 @@ namespace solarApp
|
|||||||
gv_inv_detail.Columns[3].Width = 100;
|
gv_inv_detail.Columns[3].Width = 100;
|
||||||
gv_inv_detail.Columns[4].Width = 80;
|
gv_inv_detail.Columns[4].Width = 80;
|
||||||
gv_inv_detail.Columns[5].Width = 80;
|
gv_inv_detail.Columns[5].Width = 80;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void bt_sensor_lackData_Click(object sender, EventArgs e)
|
private void bt_sensor_lackData_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@ -577,7 +586,7 @@ namespace solarApp
|
|||||||
getStationSvc GetStation = new getStationSvc();
|
getStationSvc GetStation = new getStationSvc();
|
||||||
var ds = GetStation.get_lack_stationData(dtSelect1.Value.ToString("yyyy-MM-dd"));
|
var ds = GetStation.get_lack_stationData(dtSelect1.Value.ToString("yyyy-MM-dd"));
|
||||||
|
|
||||||
procInvSvc invSvc = new procInvSvc();
|
procInvSvc invSvc = new procInvSvc();
|
||||||
//foreach (DateTime day in EachDay(DateTime.Parse(date1), DateTime.Parse(date2)))
|
//foreach (DateTime day in EachDay(DateTime.Parse(date1), DateTime.Parse(date2)))
|
||||||
foreach (var item in ds)
|
foreach (var item in ds)
|
||||||
{
|
{
|
||||||
@ -640,7 +649,7 @@ namespace solarApp
|
|||||||
if (result.CompareTo("成功") == 0)
|
if (result.CompareTo("成功") == 0)
|
||||||
{
|
{
|
||||||
MessageBox.Show("【SendEmailJob】 寄送成功! ");
|
MessageBox.Show("【SendEmailJob】 寄送成功! ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private string Send(List<string> recipientEmails, string subject, string content, List<string> attachments)
|
private string Send(List<string> recipientEmails, string subject, string content, List<string> attachments)
|
||||||
{
|
{
|
||||||
@ -678,7 +687,7 @@ namespace solarApp
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//讀取 SMTP Config
|
//讀取 SMTP Config
|
||||||
if (CanDoSend)
|
if (CanDoSend)
|
||||||
{
|
{
|
||||||
@ -721,7 +730,7 @@ namespace solarApp
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
string json = System.Text.Json.JsonSerializer.Serialize(recipientEmails);
|
string json = System.Text.Json.JsonSerializer.Serialize(recipientEmails);
|
||||||
|
|
||||||
//MessageBox.Show("【SendEmailJob】 " + "寄送信件失敗" + json + " Exception:" + ex.Message);
|
//MessageBox.Show("【SendEmailJob】 " + "寄送信件失敗" + json + " Exception:" + ex.Message);
|
||||||
|
|
||||||
return "失敗 - " + ex.Message;
|
return "失敗 - " + ex.Message;
|
||||||
@ -730,7 +739,7 @@ namespace solarApp
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
return reason;
|
return reason;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class SMTPConfig
|
public class SMTPConfig
|
||||||
{
|
{
|
||||||
@ -761,15 +770,16 @@ namespace solarApp
|
|||||||
if (result.CompareTo("成功") == 0)
|
if (result.CompareTo("成功") == 0)
|
||||||
{
|
{
|
||||||
// MessageBox.Show("【SendEmailJob】 寄送成功! ");
|
// MessageBox.Show("【SendEmailJob】 寄送成功! ");
|
||||||
richTextBox1.AppendText(Environment.NewLine + System.DateTime.Now.ToString() + " " + result.ToString());
|
richTextBox1.AppendText(Environment.NewLine + System.DateTime.Now.ToString() + " " + result.ToString());
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
richTextBox1.AppendText(Environment.NewLine + System.DateTime.Now.ToShortTimeString() + " " + result.ToString());
|
richTextBox1.AppendText(Environment.NewLine + System.DateTime.Now.ToShortTimeString() + " " + result.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void button2_Click(object sender, EventArgs e)
|
private void button2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// string date1 = dtSelect1.Value.ToString("yyyy-MM-dd") + " "+System.DateTime.Now.AddHours(-2) + ":00:00";
|
// string date1 = dtSelect1.Value.ToString("yyyy-MM-dd") + " "+System.DateTime.Now.AddHours(-2) + ":00:00";
|
||||||
@ -778,9 +788,9 @@ namespace solarApp
|
|||||||
{
|
{
|
||||||
date1 = dtSelect1.Value.ToString("yyyy-MM-dd ") + textBox1.Text + ":00:00";
|
date1 = dtSelect1.Value.ToString("yyyy-MM-dd ") + textBox1.Text + ":00:00";
|
||||||
}
|
}
|
||||||
|
|
||||||
var site_list = stationSvc.get_station_list();
|
var site_list = stationSvc.get_station_list();
|
||||||
|
|
||||||
procSensorSvc procSensor = new procSensorSvc();
|
procSensorSvc procSensor = new procSensorSvc();
|
||||||
foreach (var item in site_list)
|
foreach (var item in site_list)
|
||||||
{
|
{
|
||||||
@ -839,7 +849,7 @@ namespace solarApp
|
|||||||
}
|
}
|
||||||
lbMsgTitle.Text = System.DateTime.Now.ToString() + " 水位管理 - 資料搬移完成!";
|
lbMsgTitle.Text = System.DateTime.Now.ToString() + " 水位管理 - 資料搬移完成!";
|
||||||
}
|
}
|
||||||
|
|
||||||
//test for email format
|
//test for email format
|
||||||
//private void button3_Click(object sender, EventArgs e)
|
//private void button3_Click(object sender, EventArgs e)
|
||||||
//{
|
//{
|
||||||
|
|||||||
@ -1,4 +1,64 @@
|
|||||||
<root>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
|||||||
2393
solarApp/fmMain.Designer.cs
generated
2393
solarApp/fmMain.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,7 @@ namespace solarApp
|
|||||||
public fmMain()
|
public fmMain()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
// init_GridView();
|
// init_GridView();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void button1_Click(object sender, EventArgs e)
|
private async void button1_Click(object sender, EventArgs e)
|
||||||
@ -38,15 +38,15 @@ namespace solarApp
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show(ex.Message);
|
MessageBox.Show(ex.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
gv_web_inv_hour.DataSource = inv_svc.get_web_Inv_hour(date2, lbInverterID.Text);
|
gv_web_inv_hour.DataSource = inv_svc.get_web_Inv_hour(date2, lbInverterID.Text);
|
||||||
|
|
||||||
gv_web_inv_day.DataSource = inv_svc.get_web_Inv_day(date1, date2, lbInverterID.Text);
|
gv_web_inv_day.DataSource = inv_svc.get_web_Inv_day(date1, date2, lbInverterID.Text);
|
||||||
|
|
||||||
gv_web_inv_month.DataSource = inv_svc.get_web_Inv_month( date1.Substring(0, 7), date2.Substring(0, 7), lbInverterID.Text);
|
gv_web_inv_month.DataSource = inv_svc.get_web_Inv_month(date1.Substring(0, 7), date2.Substring(0, 7), lbInverterID.Text);
|
||||||
|
|
||||||
lbMsg_inv.Text = " done " + System.DateTime.Now.ToShortTimeString();
|
lbMsg_inv.Text = " done " + System.DateTime.Now.ToShortTimeString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,12 +57,12 @@ namespace solarApp
|
|||||||
//string date2 = dtSelect_sensor2.Value.ToString("yyyy-MM-dd");
|
//string date2 = dtSelect_sensor2.Value.ToString("yyyy-MM-dd");
|
||||||
string date1 = dtselect_inv.Value.AddDays(-7).ToString("yyyy-MM-dd");
|
string date1 = dtselect_inv.Value.AddDays(-7).ToString("yyyy-MM-dd");
|
||||||
|
|
||||||
gv_web_inv_hour.DataSource = inv_svc.get_web_Inv_15min(date2, lbInverterID.Text , lbSiteID_inv.Text.Substring(0, 9));
|
gv_web_inv_hour.DataSource = inv_svc.get_web_Inv_15min(date2, lbInverterID.Text, lbSiteID_inv.Text.Substring(0, 9));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fmMain_Load(object sender, EventArgs e)
|
private void fmMain_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
dtselect_station1.Value = DateTime.Today.AddDays(-1);
|
dtselect_station1.Value = DateTime.Today.AddDays(-1);
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ namespace solarApp
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region 顯示逆變器list
|
#region 顯示逆變器list
|
||||||
//add_inv_list();
|
//add_inv_list();
|
||||||
#endregion
|
#endregion
|
||||||
@ -112,12 +112,12 @@ namespace solarApp
|
|||||||
lbSiteID_sensor.Text = lbSiteID_inv.Text;
|
lbSiteID_sensor.Text = lbSiteID_inv.Text;
|
||||||
|
|
||||||
//顯示 table name on label
|
//顯示 table name on label
|
||||||
lbSiteRaw.Text = lbSiteName_inv.Text + " "+ lbSiteDB_inv.Text + ".s" + lbSiteID_inv.Text + "_Station";
|
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";
|
lbInvRaw.Text = lbSiteName_inv.Text + " " + lbSiteDB_inv.Text + ".s" + lbSiteID_inv.Text + "_Inv";
|
||||||
lbSensorRaw.Text = lbSiteName_inv.Text + " " + lbSiteDB_inv.Text + ".s" + lbSiteID_inv.Text + "_SensorAVG";
|
lbSensorRaw.Text = lbSiteName_inv.Text + " " + lbSiteDB_inv.Text + ".s" + lbSiteID_inv.Text + "_SensorAVG";
|
||||||
|
|
||||||
add_inv_list(lbSiteDB_inv.Text, lbSiteID_inv.Text.Substring(0, 9));
|
add_inv_list(lbSiteDB_inv.Text, lbSiteID_inv.Text.Substring(0, 9));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -125,9 +125,10 @@ namespace solarApp
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="siteDB"></param>
|
/// <param name="siteDB"></param>
|
||||||
/// <param name="siteID"></param>
|
/// <param name="siteID"></param>
|
||||||
void add_inv_list(string siteDB, string siteID) {
|
void add_inv_list(string siteDB, string siteID)
|
||||||
|
{
|
||||||
fp_inv.Controls.Clear();
|
fp_inv.Controls.Clear();
|
||||||
var inv_list = inv_svc.get_Inv_list(siteDB, siteID);
|
var inv_list = inv_svc.get_Inv_list(siteDB, siteID);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
foreach (var item in inv_list)
|
foreach (var item in inv_list)
|
||||||
{
|
{
|
||||||
@ -147,8 +148,8 @@ namespace solarApp
|
|||||||
private void radio_inv_click(object sender, EventArgs e)
|
private void radio_inv_click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
RadioButton rb = sender as RadioButton;
|
RadioButton rb = sender as RadioButton;
|
||||||
if (rb.Checked)
|
if (rb.Checked)
|
||||||
{
|
{
|
||||||
lbInverterID.Text = rb.Text;
|
lbInverterID.Text = rb.Text;
|
||||||
lbMsg_inv.Text = "...";
|
lbMsg_inv.Text = "...";
|
||||||
}
|
}
|
||||||
@ -194,11 +195,11 @@ namespace solarApp
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
gv_fic_station_raw.DataSource = stationSvc.get_station_raw(date2, lbSiteDB_inv.Text, lbSiteID_inv.Text);
|
gv_fic_station_raw.DataSource = stationSvc.get_station_raw(date2, lbSiteDB_inv.Text, lbSiteID_inv.Text);
|
||||||
gv_fic_station_day.DataSource = stationSvc.get_station_rawAvg(date1, date2, lbSiteDB_inv.Text, lbSiteID_inv.Text);
|
gv_fic_station_day.DataSource = stationSvc.get_station_rawAvg(date1, date2, lbSiteDB_inv.Text, lbSiteID_inv.Text);
|
||||||
}
|
}
|
||||||
catch (Exception ex )
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show( ex.Message);
|
MessageBox.Show(ex.Message);
|
||||||
}
|
}
|
||||||
gv_web_station_hour.DataSource = stationSvc.get_web_station_hour(date2, lbSiteID_inv.Text);
|
gv_web_station_hour.DataSource = stationSvc.get_web_station_hour(date2, lbSiteID_inv.Text);
|
||||||
|
|
||||||
@ -223,8 +224,8 @@ namespace solarApp
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show(ex.Message);
|
MessageBox.Show(ex.Message);
|
||||||
}
|
}
|
||||||
gv_web_sensor_hour.DataSource = sensorSvc.get_web_sensor_hour(date2, lbSiteID_inv.Text.Substring(0, 09));
|
gv_web_sensor_hour.DataSource = sensorSvc.get_web_sensor_hour(date2, lbSiteID_inv.Text.Substring(0, 09));
|
||||||
|
|
||||||
gv_web_sensor_day.DataSource = sensorSvc.get_web_sensor_day(date1, date2, lbSiteID_inv.Text.Substring(0, 09));
|
gv_web_sensor_day.DataSource = sensorSvc.get_web_sensor_day(date1, date2, lbSiteID_inv.Text.Substring(0, 09));
|
||||||
@ -329,7 +330,7 @@ namespace solarApp
|
|||||||
|
|
||||||
private void button1_Click_2(object sender, EventArgs e)
|
private void button1_Click_2(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if(label13.Text == "solar_master.notice_schedule資料表")
|
if (label13.Text == "solar_master.notice_schedule資料表")
|
||||||
{
|
{
|
||||||
gv_notice_data.DataSource = errorSvc.QueryAlarmorion_orionalarmrecordData();
|
gv_notice_data.DataSource = errorSvc.QueryAlarmorion_orionalarmrecordData();
|
||||||
label13.Text = "solar_master.alarmorion_orionalarmrecord資料表";
|
label13.Text = "solar_master.alarmorion_orionalarmrecord資料表";
|
||||||
|
|||||||
@ -1,4 +1,64 @@
|
|||||||
<root>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user