public static DbOutParameter ExecuteSP(xsSpParameter spPara) { DbInParameter dbInPara = new DbInParameter(); DbOutParameter dbOutPara = new DbOutParameter(); dbInPara.StoreProcureName = spPara.SPName; //set sp name dbInPara.IsReturnDataSet = spPara.IsReturnDataSet; //set sp return dbInPara.AddParameter(spPara.SpParameters); //set spparameter DbAccess Dao = new DbAccess(); Dao.Open(spPara.SqlConnectString); dbOutPara = Dao.ExecProcedure(dbInPara); Dao.Close(); return(dbOutPara); }
public static DataTable GetDataTable(xsSpParameter spPara) { spPara.IsReturnDataSet = true;//must reurn dataset ,set true return(ExecuteSP(spPara).ReturnDataTable); }