|
|
@@ -97,9 +97,10 @@ namespace UAS_CheckWork
|
|
|
{
|
|
|
//循环获取
|
|
|
DataTable dt = new DataTable();
|
|
|
- string LastDate = dh.getFieldDataByCondition("cardlog", "to_char(max(cl_time),'yyyy-MM-dd HH24:mi:ss')", "cl_address='考勤机数据导入'").ToString();
|
|
|
dt.Columns.Add("cl_cardcode");
|
|
|
dt.Columns.Add("cl_time");
|
|
|
+ showDataGrid.DataSource = dt;
|
|
|
+ string LastDate = dh.getFieldDataByCondition("cardlog", "to_char(max(cl_time),'yyyy-MM-dd HH24:mi:ss')", "cl_address='考勤机数据导入'").ToString();
|
|
|
if (LastDate == "")
|
|
|
{
|
|
|
LastDate = "1990-01-01 00:00:00";
|
|
|
@@ -142,8 +143,7 @@ namespace UAS_CheckWork
|
|
|
}
|
|
|
if (cl_time.Count > 0)
|
|
|
dh.BatchInsert(sql.ToString(), new string[] { "cl_cardcode", "cl_time" }, cl_cardcode.ToArray(), cl_time.ToArray());
|
|
|
- allData.DataSource = dt;
|
|
|
- showDataGrid.DataSource = (DataTable)allData.DataSource;
|
|
|
+ showDataGrid.DataSource = dt;
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
MessageBox.Show("数据同步成功");
|