1
This commit is contained in:
@@ -30,9 +30,8 @@ namespace Tnb.WarehouseMgr
|
||||
List<BasLocation> list = await _db.Queryable<BasLocation>().Where(it => it.location_code.StartsWith("CP-A", StringComparison.OrdinalIgnoreCase)).OrderBy(i => i.location_code).ToListAsync();
|
||||
foreach (var loc in list)
|
||||
{
|
||||
ReadOnlySpan<char> inputSpan = loc.location_code.AsSpan();
|
||||
ReadOnlySpan<char> lastTwoCharacters = inputSpan.Slice(inputSpan.Length - 2);
|
||||
int num = lastTwoCharacters.ToString().Match(@"\d+").ParseToInt();
|
||||
var input = loc.location_code.Substring(loc.location_code.Length - 2);
|
||||
int num = input.Match(@"\d+").ParseToInt();
|
||||
await _db.Updateable<BasLocation>().SetColumns(it => it.loc_column == num).Where(it => it.id == loc.id).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user