| | |
| | | private SqlConnection connForUpload; |
| | | private string _standardCheckMode; |
| | | |
| | | int enableUploadMinutes = 10; |
| | | private static readonly object synObj = new object(); |
| | | public DetectionData() |
| | | { |
| | |
| | | catch (Exception) |
| | | { |
| | | CommonUtil.WriteLog(LogType.Err, "DataUpload连接数据库失败!"); |
| | | } |
| | | |
| | | string enableUploadMinutesStr = ConfigurationManager.AppSettings["EnableUploadMinutes"]; |
| | | |
| | | int temp = 0; |
| | | if (int.TryParse(enableUploadMinutesStr, out temp)) |
| | | { |
| | | enableUploadMinutes = temp; |
| | | } |
| | | else |
| | | { |
| | | enableUploadMinutes = 10; |
| | | } |
| | | } |
| | | |
| | |
| | | #region add by Patrick 2018-07-13 |
| | | public void SaveTrayBarcode(int detectID) |
| | | { |
| | | string trayCode = CarrierBarcodeCtrl.GlobalCarrierBarcode; |
| | | string trayCode = ""; |
| | | trayCode = CarrierBarcodeCtrl.GlobalCarrierBarcode; |
| | | |
| | | if (string.IsNullOrEmpty(trayCode)) |
| | | { |
| | |
| | | AND ProductNoStatus = 'OK' |
| | | AND ProductStatus<>'NA' |
| | | AND (ISNULL(CarrierBarcode,'')<>'' OR ProductStatus = 'NG') |
| | | AND DATEDIFF(DAY,'{0}',DetectTime)>=-1 |
| | | ORDER BY DetectTime DESC", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | AND DATEDIFF(MINUTE,DetectTime,'{0}')<={1} |
| | | ORDER BY DetectTime DESC", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), enableUploadMinutes.ToString()); |
| | | |
| | | SqlDataReader dr = null; |
| | | using (SqlCommand cmd = new SqlCommand(sql, connForUpload)) |