xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 16KB
    文件類型: .cs
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-07
  • 語言: C#
  • 標簽: SQLite??C#??

資源簡介

這是一個針對System.Data.SQLite的數據庫常規操作封裝的C#通用類,調用此類可以快速的加快開發速度,直接調用即可,里面也有詳細的注釋說明!

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.Data;
using?System.Configuration;
using?System.Data.Common;
using?System.Data.SQLite;
using?System.IO;
using?System.Windows.Forms;

namespace?Common.Tools
{
????///??
????///?說明:這是一個針對System.Data.SQLite的數據庫常規操作封裝的通用類。?
????///?huangjie?add?2014-10-31
????///?
????
????public?class?SQLiteDBHelper
????{
????????private?string?dbPath?=?Application.StartupPath?+?“\\Database.db3“;
????????private?string?connectionString?=?string.Empty;

????????#region?數據庫連接必要條件參數

????????private?SQLiteConnection?dbConnection?=?null;
????????///?
????????///?數據庫連接
????????///?

????????public?SQLiteConnection?DbConnection
????????{
????????????get
????????????{
????????????????if?(this.dbConnection?==?null)
????????????????{
????????????????????//?若沒打開,就變成自動打開關閉的
????????????????????this.Open();
????????????????????this.AutoOpenClose?=?true;
????????????????}
????????????????return?this.dbConnection;
????????????}
????????????set
????????????{
????????????????this.dbConnection?=?value;
????????????}
????????}
????????private?SQLiteCommand?dbCommand?=?null;
????????///?
????????///?命令
????????///?

????????public?SQLiteCommand?DbCommand
????????{
????????????get
????????????{
????????????????return?this.dbCommand;
????????????}
????????????set
????????????{
????????????????this.dbCommand?=?value;
????????????}
????????}
????????private?SQLiteDataAdapter?dbDataAdapter?=?null;
????????///?
????????///?數據庫適配器
????????///?

????????public?SQLiteDataAdapter?DbDataAdapter
????????{
????????????get
????????????{
????????????????return?this.dbDataAdapter;
????????????}
????????????set
????????????{
????????????????this.dbDataAdapter?=?value;
????????????}
????????}

????????///?
????????///?數據庫連接
????????///?

????????public?string?ConnectionString
????????{
????????????get
????????????{
????????????????return?this.connectionString;
????????????}
????????????set
????????????{
????????????????this.connectionString?=?value;
????????????}
????????}

????????private?SQLiteTransaction?dbTransaction?=?null;
????????private?bool?inTransaction?=?false;
????????///?
????????///?是否已采用事務
????????///?

????????public?bool?InTransaction
????????{
????????????get
????????????{
????????????????return?this.inTransaction;
????????????}
????????????set
????????????{
????????????????this.inTransaction?=?value;
????????????}
????????}
????????private?bool?autoOpenClose?=?false;
????????///?
????????///?默認打開關閉數據庫選項(默認為否)
????????///?

????????public?bool?AutoOpenClose
????????{
????????????get
????????????{
????????????????return?autoOpenClose;
????????????}
????????????set
????????????{
????????????????autoOpenClose?=?value;
????????????}
????????}

????????#endregion



評論

共有 條評論