|
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|
|
using System.ComponentModel;
|
|
|
using System.Data;
|
|
|
using System.Drawing;
|
|
|
+using System.IO;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Windows.Forms;
|
|
@@ -70,8 +71,9 @@ namespace UAS_MES_NEW.Make
|
|
|
{
|
|
|
string ms_prodcode = dh.getFieldDataByCondition("makeserial", "ms_prodcode", "ms_id='" + oMsid + "'").ToString();
|
|
|
DataTable dt = new DataTable();
|
|
|
- BaseUtil.GetDataFromDevice("GETFILE", WatchPath.Text + sncode.Text + ".csv");
|
|
|
- BaseUtil.OpenCSVFile(ref dt, Application.StartupPath + @"\" + sncode.Text + ".csv");
|
|
|
+ BaseUtil.GetDataFromDevice("GETFILE", WatchPath.Text + " ./" + DateTime.Now.ToString("yyyy-MM-dd") + @"/" + sncode.Text);
|
|
|
+ string[] files = Directory.GetFiles(Application.StartupPath + "/" + DateTime.Now.ToString("yyyy-MM-dd") + @"/" + sncode.Text, "*.csv");
|
|
|
+ BaseUtil.OpenCSVFile(ref dt, files[0]);
|
|
|
//移除标题行
|
|
|
dt.Rows.RemoveAt(0);
|
|
|
//设置列名绑定数据
|