Saxonite 1.2.11.4. BusinessMgr.

This commit is contained in:
Andy Howard
2024-06-04 16:14:45 +01:00
parent 7748941680
commit ba5801b4dc
33 changed files with 595 additions and 219 deletions
@@ -587,14 +587,14 @@ namespace Sarand.Net.Standard.Proc.Excel
public static int GetPosForColId(String colId)
{
colId = StringUtil.TrimWhitespace(StringUtil.OnBlank(colId)).ToUpper();
if (!colId.Matches(new Regex("[A-Z]+")))
if (!colId.IsMatch("^[A-Z]{1,2}$"))
{
SaLogger.Warn(SysUtil.Fn + " Invalid column Id supplied: '" + colId + "'");
return -1;
return 0;
}
int col = (colId[0] - 'A');
int col = (colId[0] - 'A' + 1);
if (colId.Length > 1)
col = ((colId[1] - 'A') * 26) + (colId[0] - 'A');
col = (col * 26) + (colId[1] - 'A' + 1);
return col;
}
@@ -845,7 +845,7 @@ namespace Sarand.Net.Standard.Proc.Excel
try
{
if (IsCellDate(cell))
return new DataValue(cell.DateCellValue);
return new DataValue((DateTime)(cell.DateCellValue ?? DateTime.MinValue));
if (IsCellNumeric(cell))
{
double value = cell.NumericCellValue;
@@ -971,7 +971,7 @@ namespace Sarand.Net.Standard.Proc.Excel
try
{
IRow row = GetRowByPos(rowPos, true);
for (int valueIdx = 0; valueIdx < values.Count; valueIdx++)
for (int valueIdx = 0; valueIdx < values.Count; valueIdx++)
{
uint colPos = (uint)Math.Max(1, colPosStart + valueIdx);
Object value = values[valueIdx];
+8 -3
View File
@@ -1,4 +1,6 @@
using Sarand.Net.Standard.Base.Procs;
using Sarand.Net.Standard.Base.App;
using Sarand.Net.Standard.Base.Dbas;
using Sarand.Net.Standard.Base.Procs;
using System;
using System.Collections.Generic;
using System.Text;
@@ -13,8 +15,11 @@ namespace Sarand.Net.Standard.Proc.Procs
// Definitions.
public new class Config : SaProcess_Base.Config
{
protected Config() : base()
{ }
protected Config(DbUpdateInfo dbUpdateInfo) : base()
{
this.DbUpdateInfo = dbUpdateInfo;
}
public DbUpdateInfo DbUpdateInfo { get; }
}
//-------------------------------------------------------------------