V1.0.0.7 - 2025/12/22

* Database improved all
This commit is contained in:
2025-12-22 12:46:46 +09:00
parent 79fea6964b
commit 0af235eb3d
14 changed files with 642 additions and 364 deletions

View File

@@ -36,6 +36,19 @@ namespace LFP_Manager.Controls
InitializeComponent();
dtHistory = new DataTable();
CbLogType.Properties.Items.Add("Cycle");
CbLogType.Properties.Items.Add("Event");
CbLogType.SelectedIndex = 0;
CbMdNo.Properties.Items.Clear();
CbMdNo.Properties.Items.Add("All");
for (int i = 1; i <= csConstData.SystemInfo.MAX_MODULE_SIZE; i++)
{
CbMdNo.Properties.Items.Add(i.ToString());
}
CbMdNo.SelectedIndex = 0;
}
public void SetCommCofig(CommConfig aConfig)
@@ -123,6 +136,19 @@ namespace LFP_Manager.Controls
{
quary = String.Format(" where create_date > '{0:yyyy-MM-dd HH:mm:ss}'", start);
quary += String.Format(" and create_date < '{0:yyyy-MM-dd HH:mm:ss}'", end);
if (CbLogType.Text == "")
quary += "";
else if (CbLogType.SelectedIndex == 0)
quary += " and log_type = '0'";
else
quary += " and log_type = '1'";
if ((CbMdNo.Text == "") || (CbMdNo.Text == "All") || (CbMdNo.SelectedIndex == 0))
quary += "";
else
quary += $" and module_no = '{CbMdNo.SelectedIndex}'";
dDt[0] = csDbUtils.BmsDataSelectToDataTable(Config, start, quary);
if (dDt[0] == null)
MessageBox.Show("No data", "Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
@@ -143,11 +169,23 @@ namespace LFP_Manager.Controls
if (i == 0)
{
quary = String.Format(" where create_date > '{0:yyyy-MM-dd HH:mm:ss}'", start);
if (CbLogType.Text == "")
quary += "";
if (CbLogType.SelectedIndex == 0)
quary += " and log_type = '0'";
else
quary += " and log_type = '1'";
dDt[i] = csDbUtils.BmsDataSelectToDataTable(Config, start, quary);
}
else if (i == total_days)
{
quary = String.Format(" where create_date < '{0:yyyy-MM-dd HH:mm:ss}'", end);
if (CbLogType.Text == "")
quary += "";
if (CbLogType.SelectedIndex == 0)
quary += " and log_type = '0'";
else
quary += " and log_type = '1'";
dDt[i] = csDbUtils.BmsDataSelectToDataTable(Config, end, quary);
}
else