Session Console and Internals.
This commit is contained in:
@@ -51,7 +51,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
}
|
||||
SbmPrice price = null;
|
||||
// Query data.
|
||||
using (var dbConnection = db.CreateConnection())
|
||||
using (var dbConnection = Database.CreateConnection())
|
||||
using (var dbCommand = dbConnection.CreateCommand())
|
||||
{
|
||||
try
|
||||
@@ -101,7 +101,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
ClearErrorState();
|
||||
if (!IsValidPrice(price)) return false;
|
||||
if (SysId.IsValid(price.Id)) return SetErrorState(ErrorMessage.ValiditemId);
|
||||
using (var dbConnection = db.CreateConnection())
|
||||
using (var dbConnection = Database.CreateConnection())
|
||||
using (var dbCommand = dbConnection.CreateCommand())
|
||||
{
|
||||
try
|
||||
@@ -132,7 +132,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
if (DebugMode) SaLogger.Debug($"{SysUtil.Fn} Data not changed." + GetLogProperties(price).Concat(": ").Concat("", "\n\t"));
|
||||
return true;
|
||||
}
|
||||
using (var dbConnection = db.CreateConnection())
|
||||
using (var dbConnection = Database.CreateConnection())
|
||||
using (var dbCommand = dbConnection.CreateCommand())
|
||||
{
|
||||
try
|
||||
@@ -170,7 +170,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
{
|
||||
ClearErrorState();
|
||||
if (!PriceCanBeDeleted(price)) return false;
|
||||
using (var dbConnection = db.CreateConnection())
|
||||
using (var dbConnection = Database.CreateConnection())
|
||||
using (var dbCommand = dbConnection.CreateCommand())
|
||||
{
|
||||
try
|
||||
@@ -465,7 +465,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
private long GetPriceCount(String filter)
|
||||
{
|
||||
ClearErrorState();
|
||||
return db.GetRowCount(SbmDbDfn.GetTableName(SbmDbDfn.TableIdx.SaPrice) + " As " + aliasPrice, filter);
|
||||
return Database.GetRowCount(SbmDbDfn.GetTableName(SbmDbDfn.TableIdx.SaPrice) + " As " + aliasPrice, filter);
|
||||
}
|
||||
public override long GetPriceCount(SbmPrice.Params prm)
|
||||
{
|
||||
@@ -479,14 +479,14 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
{
|
||||
ClearErrorState();
|
||||
List<SbmPrice> prices = new List<SbmPrice>();
|
||||
DbQuery qry = new DbQuery(db.DbmsType);
|
||||
DbQuery qry = new DbQuery(Database.DbmsType);
|
||||
qry.Tables.Add(SbmDbDfn.GetTableName(SbmDbDfn.TableIdx.SaPrice), aliasPrice);
|
||||
SaPrice_Db dbPrice = new SaPrice_Db(DbInfo);
|
||||
qry.Columns.AddRange(dbPrice.ExistingColumnNames);
|
||||
qry.Filters.AddRange(GetPriceQueryFilter(prm));
|
||||
qry.OrderBy.AddRange(GetPriceSortColumns(prm));
|
||||
// Query data.
|
||||
using (var dbConnection = db.CreateConnection())
|
||||
using (var dbConnection = Database.CreateConnection())
|
||||
using (var dbCommand = dbConnection.CreateCommand())
|
||||
{
|
||||
try
|
||||
@@ -519,7 +519,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
ClearErrorState();
|
||||
//---------------------------------------------------------------------
|
||||
// Construct build database query.
|
||||
DbQuery query = new DbQuery(db.DbmsType);
|
||||
DbQuery query = new DbQuery(Database.DbmsType);
|
||||
query.Tables.Add(SbmDbDfn.GetTableName(SbmDbDfn.TableIdx.SaPrice), aliasPrice);
|
||||
|
||||
// Price Properties - add columns as defined in query list.
|
||||
@@ -607,8 +607,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
//return new DbResultSet_DataTableReader(db, query.BuildQuery());
|
||||
return DbResultSet_DataReader.ExecuteQuery(db, query.BuildQuery(prm.ResultsPaging));
|
||||
//return new DbResultSet_DataTableReader(Database, query.BuildQuery());
|
||||
return DbResultSet_DataReader.ExecuteQuery(Database, query.BuildQuery(prm.ResultsPaging));
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user