public static void ExecuteNoQuery(string procname, ref object model) { DbCommand dbcmd = db.GetStoredProcCommand(procname); dbcmd.CommandTimeout = 300; // 利用模型的值为存储过程出入口参数赋值(注:模型的值由客户端传递) ProcProxy.AddInParameterToDbCommand(procname, dbcmd, ref model); db.ExecuteDataSet(dbcmd); // 取得存储过程出口参数为模型赋值 ProcProxy.GetOutParameterFromDbCommand(procname, dbcmd, ref model); }
public static DataSet ExecuteDataSet(string procname, ref object model) { DbCommand dbcmd = db.GetStoredProcCommand(procname); dbcmd.CommandTimeout = 300; // 为存储过程出入口参数赋值 ProcProxy.AddInParameterToDbCommand(procname, dbcmd, ref model); DataSet dst = db.ExecuteDataSet(dbcmd); // 取得存储过程出口参数为模型赋值 ProcProxy.GetOutParameterFromDbCommand(procname, dbcmd, ref model); return(dst); }