自己常用到的自定義公共類 已測試通過

2021-04-12 20:00:36 字數 1932 閱讀 3938

using system;

using system.data;

using system.data.sqlclient;

using system.configuration;

using system.io;

/** author:zhanglei

* create date:2007.1.5

* 功能:bll層,實現了資料庫操作的封裝

* 並且提供了足夠的執行儲存過程的引數組合

* description:本類中用到了方法過載

* executedataset方法在本類中實現了四次過載

* */

namespace job_17

mycomm.connection=myconn;

mycomm.commandtext=cmdtext;

if (trans!=null)

mycomm.commandtype=cmdtype;

if (param!=null)}}

///

/// 第乙個返回dataset型別的executedataset方法

///

public datasetexecutedataset(sqlconnection myconn,commandtype cmdtype,string cmdtext,sqlparameter commandpara)

///

/// 第二個返回dataset型別的executedataset方法

/// 是在第乙個方法的基礎上實現,實現了executedataset方法的過載

///

public datasetexecutedataset(string connstr,commandtype cmdtype,string cmdtext,sqlparameter cmdpara)//方法過載,在第一種的基礎上過載,以便提供足夠多的引數組合

}///

/// 第三個返回dataset型別的executedataset方法

/// 提供使用儲存過程時不帶引數的組合

///

public datasetexecutedataset(sqlconnection myconn,commandtype cmdtype,string cmdtext)

///

/// 第四個返回dataset型別的executedataset方法

/// 提供使用儲存過程時不帶引數的組合

///

public datasetexecutedataset(string connstr,commandtype cmdtype,string cmdtext)

#endregion

#region "執行返回結果的sql語句"

///

/// 返回結果的型別為datatable

///

public datatable executedatatablesql(string sql)

///

/// 返回結果的型別為sqldatareader

///

public dataset executesqlds(string sql)

#endregion

#region "執行不返回結果的sql語句"

///

/// 執行不返回結果的sql語句

///

#region "啟用帶事務的sql語句如(insert,update)"

///

/// 使用事務處理

///

public void executetransql(string sql)

catch(exception ex)

}#endregion}}

自己常用到的自定義公共類 已測試通過

using system using system.data using system.data.sqlclient using system.configuration using system.io author zhanglei create date 2007.1.5 功能 層,實現了資料庫...

DataList控制項的自定義分頁 已測試通過

using system using system.collections using system.componentmodel using system.data using system.drawing using system.web using system.web.sessionstat...

自己常用的linux的自定義命令

2012 01 09 23 55 標籤 linux 分類 shell cd mkdir mybin vi bash profile 其中有這麼一行 path path home bin 在這行下面加一行 path path mybin 其中 表示使用者目錄。然後儲存退出 wq 或者 source b...