General tidy.

This commit is contained in:
Andy Howard
2024-06-13 14:32:44 +01:00
parent 0c44e9ddd3
commit bf6bb966bc
159 changed files with 1166 additions and 972 deletions
@@ -64,7 +64,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
catch (Exception exc)
{
SetErrorState("Database query exception");
SaLogger.Warn(GetType().Name + ".GetPrice\n\tQuery: " + dbCommand.CommandText + "\n\tException: " + exc.Message);
SaLogger.Warn($"{SysUtil.Fn}\n\tQuery: {dbCommand.CommandText}\n\t{ExceptionUtil.GetErrorStateMessage(exc)}");
}
}
return price;
@@ -479,7 +479,8 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
// Price list.
public override List<SbmPrice> GetPriceList(SbmPrice.Params prm)
{
List<SbmPrice> Prices = new List<SbmPrice>();
ClearErrorState();
List<SbmPrice> prices = new List<SbmPrice>();
DbQuery qry = new DbQuery(db.DbmsType);
qry.Tables.Add(SbmDbDfn.GetTableName(SbmDbDfn.TableIdx.SaPrice), aliasPrice);
SaPrice_Db dbPrice = new SaPrice_Db(DbInfo);
@@ -500,16 +501,17 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
{
dbPrice = new SaPrice_Db(DbInfo);
dbPrice.PopulateFrom(dbDataReader);
Prices.Add(CreatePrice(dbPrice));
prices.Add(CreatePrice(dbPrice));
}
}
}
catch (Exception exc)
{
SaLogger.Warn(GetType().Name + ".GetPriceList\n\tQuery: " + dbCommand.CommandText + "\n\tException: " + exc.Message);
SetErrorState("Database query exception");
SaLogger.Warn($"{SysUtil.Fn}\n\tQuery: {dbCommand.CommandText}\n\t{ExceptionUtil.GetErrorStateMessage(exc)}");
}
}
return Prices;
return prices;
}
//-------------------------------------------------------------------