[성현모] CPXV2 Init

This commit is contained in:
SHM
2024-06-26 10:30:00 +09:00
parent cdf12248c5
commit 5958993b6a
588 changed files with 698420 additions and 0 deletions

View File

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SystemX.Net.Platform.Common
{
public static class DataTableQuery
{
public static List<DataRow> FindDataRow(DataTable dtTable, string strKeyName, string strFindingValue)
{
List<DataRow> adrResult = (from dtRow in dtTable.AsEnumerable() where dtRow[strKeyName].ToString() == strFindingValue select dtRow).ToList();
return adrResult;
}
public static int GetDataRowHandle(DataTable dtTable, string strKeyFieldName, string strComparingValue)
{
int nIdx = 0;
foreach (DataRow dtRow in dtTable.AsEnumerable())
{
if (dtRow[strKeyFieldName].ToString() == strComparingValue)
return nIdx;
nIdx++;
}
return -1;
}
}
}