SqlParameter[] arParms = new SqlParameter[2];
arParms[0] = new SqlParameter("@userid", enamestr);
arParms[0].Direction = ParameterDirection.Input;
arParms[2] = new SqlParameter("@right", SqlDbType.VarChar, 1);
arParms[2].Direction = ParameterDirection.Output;
SqlHelper.ExecuteNonQuery
(
connectionString,
CommandType.StoredProcedure,
"p_uis_save",
arParms
);
string oknot = Convert.ToString(arParms[2].Value);
//執行存儲過程返回返回數據表
DataSet userds = SqlHelper.ExecuteDataset
(
connectionString,
CommandType.StoredProcedure,
"p_sys_djget",
arParms
);
System.Data.DataTable table = userds.Tables[0];
System.Data.DataView view = new System.Data.DataView(table);
if (view.Count > 0)
{
}
}
SqlParameter[] arParms = new SqlParameter[2];
arParms[0] = new SqlParameter("@userid", enamestr);
arParms[0].Direction = ParameterDirection.Input;//輸入參數
arParms[2] = new SqlParameter("@right", SqlDbType.VarChar, 1);
arParms[2].Direction = ParameterDirection.Output;//輸出參數
SqlHelper.ExecuteNonQuery
(
connectionString,//數據庫連接
CommandType.StoredProcedure,//類型
"p_uis_save",//存儲過程名稱
arParms //存儲過程參數
);
string oknot = Convert.ToString(arParms[2].Value);//結果
//執行存儲過程返回返回數據表
DataSet userds = SqlHelper.ExecuteDataset
(
connectionString,
CommandType.StoredProcedure,
"p_sys_djget",
arParms
);
System.Data.DataTable table = userds.Tables[0];
System.Data.DataView view = new System.Data.DataView(table);//看下面view.count ,view 應該是結果集
if (view.Count > 0)
{
}
}
其他的不懂,看代碼只是知道這麼多。