STcmd
STcmd
//執行sql語句
STcmd
STmyGrid
}
catch(SqlException ex)
{
throw ex;
}
STcmd
BindGrid();
}
(
//單擊
public void STmyGrid_cancel(object source
{
//設置DataGrid控件中要編輯的項的索引為
STmyGrid
BindGrid();
}
(
獲取管理員單擊的數據的索引
//單擊
public void STmyGrid_delete(object source
{
//創建刪除指定ID連鎖店的sql語句
string STstrsql =
//創建數據庫的SqlCommand對象
SqlCommand STcmd = new SqlCommand(STstrsql
//向SqlCommand對象添加參數
STcmd
//向參數賦值
STcmd
STcmd
try
{
//執行sql語句
STcmd
}
catch(SqlException)
{
}
STcmd
BindGrid();
}
right
From:http://tw.wingwit.com/Article/program/net/201311/15609.html