/// <summary>
/// 获取增量客户信息
/// </summary>
/// <returns></returns>
public static void RetireveCustomerInc()
{
DataDict.DC_CUSTOMERRow dateRow = null;
var maxDateRows = from rows in DataDict.Inst.DC_CUSTOMER
orderby rows.CREATE_DATE descending
select rows;
dateRow = maxDateRows.First<DataDict.DC_CUSTOMERRow>();
if (dateRow == null)
{
}
try
{
using (DataDictionaryClient sc = FreightService.Get<DataDictionaryClient, IDataDictionary>())
{
DataDict.Inst.Merge(sc.RetrieveIncreaseCustomer(dateRow.CREATE_DATE));
}
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
Debug.WriteLine(ex.StackTrace);
}
}
有maxDateRows.First<>就有 maxDateRows.Last<>
优化: scn = (from data in DataDict.Inst.DC_CUST_CONTACT
select data.ORA_ROWSCN).Max();