Commit 96d6b947 LN

1

1 个父辈 f36d1d7b
......@@ -42,6 +42,11 @@ namespace OnlineStore.AutoCountClient
private void btnSearch_Click(object sender, EventArgs e)
{
if (RobotManager.robot.sQLite == null)
{
MessageBox.Show("数据未初始化完成,请稍后!");
return;
}
DateTime startTime = dtpStartTime.Value;
DateTime endTime = dtpEndTime.Value;
......@@ -64,17 +69,36 @@ namespace OnlineStore.AutoCountClient
string code = txtCode.Text.Trim();
string[][] array = null;
bool result = RobotManager.robot.sQLite.Select(code, startTime.ToString(), endTime.ToLongTimeString(), out array);
LogUtil.error("查数据【" + code + "】【" + startTime.ToString() + "】【" + endTime.ToLongTimeString() + "】结果:" + result + "," + RobotManager.robot.sQLite.ErrInfo);
bool result = RobotManager.robot.sQLite.Select(code, startTime.ToString(), endTime.ToString(), out array);
LogUtil.error("查数据【" + code + "】【" + startTime.ToString() + "】【" + endTime.ToString() + "】结果:" + result + "," + RobotManager.robot.sQLite.ErrInfo);
if (array != null && array.Length > 0)
{
LogUtil.info("共查询到【" + array.Length + "】行数据");
this.dataGridView1.Rows.Clear();
foreach (string[] a in array)
{
DataGridViewRow view = new DataGridViewRow();
view.CreateCells(dataGridView1);
for(int i = 0; i < a.Length; i++)
{
view.Cells[i].Value = a[i];
}
//view.Cells[0].Value = point.pointNum.ToString();
//view.Cells[1].Value = point.PartNum.ToString();
//view.Cells[2].Value = point.pointName;
//view.Cells[3].Value = point.PositionX.ToString();
//view.Cells[4].Value = point.PositionY.ToString();
//view.Cells[5].Value = point.NodePositionX.ToString();
//view.Cells[6].Value = point.NodePositionY.ToString();
//view.Cells[7].Value = point.PositionNum.ToString();
//view.Cells[8].Value = point.NeedSoldering;
//view.Cells[9].Value = point.WeldTemp;
dataGridView1.Rows.Add(view);
}
}
}
private void btnBack_Click(object sender, EventArgs e)
{
this.Close();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!