Exemple #1
0
        /// <summary>
        /// 清空记录
        /// </summary>
        /// <returns></returns>
        public int ClearAll()
        {
            string sql = "delete from UserInfo";

            return(SqliteHelper.ExecuteNonQuery(sql));
        }
Exemple #2
0
        /// <summary>
        /// 按ID删除设备
        /// </summary>
        /// <param name="equipmentID"></param>
        /// <returns></returns>
        public static int DeleteByEquipmentID(long equipmentID)
        {
            string sql = string.Format("delete from tb_EquipmentData where EquipmentID={0}", equipmentID);

            return(SqliteHelper.ExecuteNonQuery(sql));
        }
Exemple #3
0
        /// <summary>
        /// 清空
        /// </summary>
        /// <returns></returns>
        public int ClearAll()
        {
            string sql = "delete from TmpBioData ";

            return(SqliteHelper.ExecuteNonQuery(sql));
        }
Exemple #4
0
        public static int DeleteAll()
        {
            string sql = "delete from tb_EquipmentData";

            return(SqliteHelper.ExecuteNonQuery(sql));
        }
Exemple #5
0
        public static int DeleteByTime(long equipmentID, DateTime dt1, DateTime dt2)
        {
            string sql = string.Format("delete from tb_EquipmentData where EquipmentID={0} and AddTime >='{1}' and AddTime <='{2}'", equipmentID, dt1.ToString(), dt2.ToString());

            return(SqliteHelper.ExecuteNonQuery(sql));
        }
Exemple #6
0
        /// <summary>Update
        /// </summary>
        /// <param name="device"></param>
        /// <returns></returns>
        public int Update(DeviceModel device)
        {
            string sql = string.Format(@"
update Device set 
    TransInterval = @TransInterval , 
    TransTimes = @TransTimes , 
    Encrypt = @Encrypt , 
    LastRequestTime = @LastRequestTime , 
    DevIP = @DevIP , 
    DevMac = @DevMac , 
    DevFirmwareVersion = @DevFirmwareVersion , 
    UserCount = @UserCount , 
    AttCount = @AttCount , 
    DevName = @DevName , 
    TimeZone = @TimeZone , 
    Timeout = @Timeout , 
    SyncTime = @SyncTime , 
    ATTLOGStamp = @ATTLOGStamp , 
    OPERLOGStamp = @OPERLOGStamp , 
    ATTPHOTOStamp = @ATTPHOTOStamp , 
    ErrorDelay = @ErrorDelay , 
    Delay = @Delay , 
    TransFlag = @TransFlag , 
    Realtime = @Realtime,  
    VendorName = @VendorName,  
    IRTempDetectionFunOn = @IRTempDetectionFunOn,  
    MaskDetectionFunOn = @MaskDetectionFunOn,  
    MultiBioDataSupport = @MultiBioDataSupport,  
    MultiBioPhotoSupport = @MultiBioPhotoSupport,  
    MultiBioVersion = @MultiBioVersion,  
    MultiBioCount = @MultiBioCount,  
    MaxMultiBioDataCount = @MaxMultiBioDataCount,  
    MaxMultiBioPhotoCount = @MaxMultiBioPhotoCount  
where DevSN=@DevSN 
");

            SQLiteParameter[] parameters =
            {
                new SQLiteParameter("@DevSN",                 device.DevSN),
                new SQLiteParameter("@TransInterval",         device.TransInterval),
                new SQLiteParameter("@TransTimes",            device.TransTimes),
                new SQLiteParameter("@Encrypt",               device.Encrypt),
                new SQLiteParameter("@LastRequestTime",       device.LastRequestTime),
                new SQLiteParameter("@DevIP",                 device.DevIP),
                new SQLiteParameter("@DevMac",                device.DevMac),
                new SQLiteParameter("@DevFirmwareVersion",    device.DevFirmwareVersion),
                new SQLiteParameter("@UserCount",             device.UserCount),
                new SQLiteParameter("@AttCount",              device.AttCount),
                new SQLiteParameter("@DevName",               device.DevName),
                new SQLiteParameter("@TimeZone",              device.TimeZone),
                new SQLiteParameter("@Timeout",               device.Timeout),
                new SQLiteParameter("@SyncTime",              device.SyncTime),
                new SQLiteParameter("@ATTLOGStamp",           device.AttLogStamp),
                new SQLiteParameter("@OPERLOGStamp",          device.OperLogStamp),
                new SQLiteParameter("@ATTPHOTOStamp",         device.AttPhotoStamp),
                new SQLiteParameter("@ErrorDelay",            device.ErrorDelay),
                new SQLiteParameter("@Delay",                 device.Delay),
                new SQLiteParameter("@TransFlag",             device.TransFlag),
                new SQLiteParameter("@Realtime",              device.Realtime),
                new SQLiteParameter("@VendorName",            device.VendorName),
                new SQLiteParameter("@IRTempDetectionFunOn",  device.IRTempDetectionFunOn),
                new SQLiteParameter("@MaskDetectionFunOn",    device.MaskDetectionFunOn),
                new SQLiteParameter("@MultiBioDataSupport",   device.MultiBioDataSupport),
                new SQLiteParameter("@MultiBioPhotoSupport",  device.MultiBioPhotoSupport),
                new SQLiteParameter("@MultiBioVersion",       device.MultiBioVersion),
                new SQLiteParameter("@MultiBioCount",         device.MultiBioCount),
                new SQLiteParameter("@MaxMultiBioDataCount",  device.MaxMultiBioDataCount),
                new SQLiteParameter("@MaxMultiBioPhotoCount", device.MaxMultiBioPhotoCount)
            };
            return(SqliteHelper.ExecuteNonQuery(sql, parameters));
        }
Exemple #7
0
        public static int DeleteByEqID(long eqid)
        {
            string sql = string.Format("delete from [tb_Chroma] where EquipmentID={0}", eqid);

            return(SqliteHelper.ExecuteNonQuery(sql));
        }
Exemple #8
0
        public static int DeleteAll()
        {
            string sql = "delete from [tb_Chroma]";

            return(SqliteHelper.ExecuteNonQuery(sql));
        }