3.0.0.1 Demo repository registration
This commit is contained in:
@@ -139,7 +139,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
public override bool UpdateReferencesToSalesTemplate(SbmCommodity commodity)
|
||||
{
|
||||
ClearErrorState();
|
||||
if (commodity == null) return SetErrorState("item not specified");
|
||||
if (commodity == null) return SetErrorState(Msg_ItemNotSpecified);
|
||||
|
||||
// Build update query to refresh all commodities that refer to this template.
|
||||
List<String> filters = new List<String>();
|
||||
@@ -189,7 +189,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
if (Database.HasErrorState())
|
||||
SetErrorState($"{Database.ErrorStateMessage}");
|
||||
|
||||
return !HasErrorState();
|
||||
return OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -575,7 +575,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
if (count == 0) return null;
|
||||
if (count != 1)
|
||||
{
|
||||
SetErrorState("Multiple Commodities found");
|
||||
SetErrorState(Msg_MultipleItemsFound);
|
||||
return null;
|
||||
}
|
||||
SbmCommodity commodity = null;
|
||||
@@ -592,7 +592,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
SetErrorState("Database query exception");
|
||||
SetErrorState(Msg_DatabaseQueryException);
|
||||
SaLogger.Warn($"{SysUtil.Fn}\n\tQuery: {dbCommand.CommandText}\n\t{ExceptionUtil.GetErrorStateMessage(exc)}");
|
||||
}
|
||||
}
|
||||
@@ -649,7 +649,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
}
|
||||
catch (Exception exc) { SetErrorState(exc.Message); }
|
||||
}
|
||||
return !HasErrorState();
|
||||
return OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -687,7 +687,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
}
|
||||
catch (Exception exc) { SetErrorState(exc.Message); }
|
||||
}
|
||||
return !HasErrorState();
|
||||
return OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -720,7 +720,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
}
|
||||
catch (Exception exc) { SetErrorState(exc.Message); }
|
||||
}
|
||||
return !HasErrorState();
|
||||
return OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -1066,7 +1066,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
alias = aliasCommodity;
|
||||
col.Set(caption, width, (int)dbCol, prefix + SbmDbDfn.GetColumnName(dbCol, false), SbmDbDfn.GetColumnNameQual(dbCol, alias), dataType, align);
|
||||
if (dataType == DataValue.DataType.String && dbCol != SbmDbDfn.ColumnIdx.Unknown)
|
||||
col.MaxLength = (int)SbmDbDfn.GetColTextLen(dbCol);
|
||||
col.MaxLength = (int)Internals.GetColTextLen(dbCol);
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
// Getting Commodity column definition.
|
||||
@@ -2691,7 +2691,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Dbas.Mgr
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
SetErrorState("Database query exception");
|
||||
SetErrorState(Msg_DatabaseQueryException);
|
||||
SaLogger.Warn($"{SysUtil.Fn}\n\tQuery: {dbCommand.CommandText}\n\t{ExceptionUtil.GetErrorStateMessage(exc)}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user