예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="xgdevice"></param>
        /// <param name="dt"></param>
        /// <param name="cardSn"></param>
        /// <returns></returns>
        private static DateTime SaveToDBAndUpdateLast(XGDevice xgdevice, DateTime dt, string cardSn)
        {
            XGData data = new XGData(dt, cardSn);

            xgdevice.DeviceDataManager.Last = data;
            DBI.Instance.InsertXGData(xgdevice, data);
            return(dt);
        }
예제 #2
0
파일: Class1.cs 프로젝트: wpmyj/c3
        /// <summary>
        ///
        /// </summary>
        /// <param name="xgData"></param>
        public void InsertXGData(XGDevice xgdevice, XGData xgData)
        {
            int    tmCardID = GetTMCardID(xgData.CardSN);
            int    deviceID = GuidHelper.ConvertToInt32(xgdevice.Guid);
            string s        = string.Format(
                "insert into tblTMData( DeviceID, TMID, TMDataDT) values ({0}, {1}, '{2}')",
                deviceID, tmCardID, xgData.DT);

            ExecuteScalar(s);
        }
예제 #3
0
파일: Class1.cs 프로젝트: hkiaipc/C3
 /// <summary>
 /// 
 /// </summary>
 /// <param name="xgData"></param>
 public void InsertXGData(XGDevice xgdevice, XGData xgData)
 {
     int tmCardID = GetTMCardID (xgData.CardSN);
     int deviceID = GuidHelper.ConvertToInt32(xgdevice.Guid);
     string s = string.Format(
         "insert into tblTMData( DeviceID, TMID, TMDataDT) values ({0}, {1}, '{2}')",
         deviceID, tmCardID, xgData.DT);
     ExecuteScalar(s);
 }
예제 #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="xgdevice"></param>
 /// <param name="dt"></param>
 /// <param name="cardSn"></param>
 /// <returns></returns>
 private static DateTime SaveToDBAndUpdateLast(XGDevice xgdevice, DateTime dt, string cardSn)
 {
     XGData data = new XGData(dt, cardSn);
     xgdevice.DeviceDataManager.Last = data;
     DBI.Instance.InsertXGData(xgdevice, data);
     return dt;
 }