コード例 #1
0
ファイル: DataSetProvider.cs プロジェクト: nxjcproject/nxjc
        private DataItem GetDataItem(DataSetInformation dataSetInformation)
        {
            DataItem     result   = new DataItem();
            ComplexQuery cmpquery = new ComplexQuery();

            cmpquery.AddNeedField(dataSetInformation.TableName, dataSetInformation.FieldName, dataSetInformation.FieldName);
            cmpquery.TopNumber = 1;
            cmpquery.AddOrderByClause("v_date", true);
            DataTable table = dataFactory.Query(cmpquery);

            foreach (DataRow item in table.Rows)
            {
                result = new DataItem
                {
                    ID    = dataSetInformation.ViewId,
                    Value = item[dataSetInformation.FieldName].ToString().Trim()
                };
            }
            return(result);
        }
コード例 #2
0
ファイル: DataSetProvider.cs プロジェクト: nxjcproject/nxjc
        private DataItem GetDataItem(DataSetInformation dataSetInformation)
        {
            DataItem result = new DataItem();
            ComplexQuery cmpquery = new ComplexQuery();
            cmpquery.AddNeedField(dataSetInformation.TableName, dataSetInformation.FieldName, dataSetInformation.FieldName);
            cmpquery.TopNumber = 1;
            cmpquery.AddOrderByClause("v_date", true);
            DataTable table = dataFactory.Query(cmpquery);

            foreach(DataRow item in table.Rows)
            {
                result = new DataItem
                {
                    ID = dataSetInformation.ViewId,
                    Value = item[dataSetInformation.FieldName].ToString().Trim()
                };
            }
            return result;
        }