1代码合并
This commit is contained in:
@@ -972,29 +972,5 @@ namespace BLL
|
||||
maxId = GetIntValue(str);
|
||||
return maxId;
|
||||
}
|
||||
|
||||
public static DataTable GetDataTableRunCommand(SqlCommand cmd)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (SqlConnection conn = new SqlConnection(connectionString))
|
||||
{
|
||||
cmd.Connection = conn;
|
||||
conn.Open();
|
||||
|
||||
using (SqlDataAdapter adapter = new SqlDataAdapter(cmd))
|
||||
{
|
||||
DataTable dataTable = new DataTable();
|
||||
adapter.Fill(dataTable);
|
||||
return dataTable;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user