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); }
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; }