Exemplo n.º 1
0
        /// <summary>
        /// 删除存储信息
        /// </summary>
        /// <param name="storageData"></param>
        public void DelStorage(StorageData storageData)
        {
            SQL sql = SqlHelper.CreateSQL("删除存储信息", "delete from 影像存储信息 where 存储ID=:存储ID");

            sql.AddParameter("存储ID", DbType.String, storageData.存储ID);
            _dbHelper.ExecuteSQL(sql);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 插入存储设备
        /// </summary>
        /// <param name="storageData"></param>
        public void InsertStorage(StorageData storageData)
        {
            SQL sql = SqlHelper.CreateSQL("新增存储信息", "insert into 影像存储信息(存储ID, 存储名称, 存储信息)values(:存储ID, :存储名称, :存储信息)");

            sql.AddParameter("存储ID", DbType.String, storageData.存储ID);
            sql.AddParameter("存储名称", DbType.String, storageData.存储名称);
            sql.AddParameter("存储信息", DbType.String, storageData.存储信息.ToString());
            _dbHelper.ExecuteSQL(sql);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 修改存储信息
        /// </summary>
        /// <param name="storageData"></param>
        public void UpdateStorage(StorageData storageData)
        {
            SQL sql = SqlHelper.CreateSQL("修改存储信息", "update 影像存储信息 set 存储名称=:存储名称,存储信息=:存储信息 where 存储ID=:存储ID");

            sql.AddParameter("存储ID", DbType.String, storageData.存储ID);
            sql.AddParameter("存储名称", DbType.String, storageData.存储名称);
            sql.AddParameter("存储信息", DbType.String, storageData.存储信息.ToString());
            _dbHelper.ExecuteSQL(sql);
        }
Exemplo n.º 4
0
        public StorageData GetStorageDataByID(string storageID)
        {
            StorageData sd = new StorageData();

            SQL sql = SqlHelper.CreateSQL("根据ID提取存储信息", "select 存储名称,存储信息 from  影像存储信息  where 存储ID = :存储ID");

            sql.AddParameter("存储ID", DbType.String, storageID);

            DataTable dt = _dbHelper.ExecuteSQL(sql);

            if (dt.Rows.Count > 0)
            {
                sd = new StorageData();
                sd.BindRowData(dt.Rows[0]);
            }

            return(sd);
        }