121221
This commit is contained in:
@@ -971,7 +971,7 @@ namespace BLL
|
||||
return maxId;
|
||||
}
|
||||
|
||||
public static int getIntValue(string sql)
|
||||
public static int getIntValue(string sql, SqlParameter[] param=null)
|
||||
{
|
||||
int i = 0;
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
@@ -981,7 +981,10 @@ namespace BLL
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(sql, Connection);
|
||||
command.CommandType = CommandType.Text;
|
||||
|
||||
if (param != null)
|
||||
{
|
||||
AddParameterToCommand(command, param);
|
||||
}
|
||||
i = Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
finally
|
||||
|
||||
Reference in New Issue
Block a user