mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-19 06:27:15 +00:00
wip
This commit is contained in:
@@ -54,7 +54,7 @@ namespace bnhtrade.Core.Data.Database.Account
|
||||
using (SqlCommand cmd = new SqlCommand(sql, conn))
|
||||
{
|
||||
cmd.Parameters.AddWithValue("@purchaseDate", periodTo);
|
||||
if (descriptionSearch.Any())
|
||||
if (lineStatus != null)
|
||||
{
|
||||
cmd.Parameters.AddWithValue("@purchaseLineStatus", lineStatus);
|
||||
}
|
||||
|
||||
@@ -9,24 +9,35 @@ namespace bnhtrade.Core.Model.Credentials
|
||||
public class bnhtradeDB
|
||||
{
|
||||
public string DataSource { get; private set; }
|
||||
|
||||
public string UserId { get; private set; }
|
||||
|
||||
public string UserPassword { get; private set; }
|
||||
|
||||
public string InitialCatalog { get; private set; } = "e2A";
|
||||
|
||||
public bool PersistSecurityInfo { get; private set; } = true;
|
||||
|
||||
public bool MultipleActiveResultSets { get; private set; } = true;
|
||||
|
||||
public uint ConnectionTimeout { get; private set; }
|
||||
|
||||
public string ConnectionString
|
||||
{ get
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Data Source=" + DataSource + ";Initial Catalog=" + InitialCatalog + ";Persist Security Info=" + PersistSecurityInfo.ToString()
|
||||
+ ";User ID=" + UserId + ";Password=" + UserPassword + ";MultipleActiveResultSets=" + MultipleActiveResultSets.ToString();
|
||||
+ ";User ID=" + UserId + ";Password=" + UserPassword + ";MultipleActiveResultSets=" + MultipleActiveResultSets.ToString()
|
||||
+ ";Connect Timeout=" + ConnectionTimeout;
|
||||
}
|
||||
}
|
||||
|
||||
public bnhtradeDB (string source, string userId, string userPassword)
|
||||
public bnhtradeDB (string source, string userId, string userPassword, uint connectionTimeout = 30)
|
||||
{
|
||||
this.DataSource = source;
|
||||
this.UserId = userId;
|
||||
this.UserPassword = userPassword;
|
||||
this.ConnectionTimeout = connectionTimeout;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user