예제 #1
0
        private int GetContact2StartVersionNumber()
        {
            int contact2StartVersionNumber = 1;

            try
            {
                using (GoldmineEntities context = new GoldmineEntities())
                {
                    contact2StartVersionNumber = int.Parse((from c in context.CONTACT2ChangeTracking(1) select c.SYS_CHANGE_VERSION).ToList().OrderByDescending(c => c.Value).First().Value.ToString());
                }
            }
            catch (Exception) { return(contact2StartVersionNumber); }
            return(contact2StartVersionNumber);
        }
예제 #2
0
        public List <CONTACT2ChangeTracking_Result> GetContact2ChangeTrackingResults(int _contact2StartVersionNumber)
        {
            List <CONTACT2ChangeTracking_Result> results = new List <CONTACT2ChangeTracking_Result>();

            try
            {
                using (GoldmineEntities context = new GoldmineEntities())
                {
                    results = (from c in context.CONTACT2ChangeTracking(_contact2StartVersionNumber) select c).ToList();
                }
                if (results.Count > 0)
                {
                    _versionNumberProcess.UpdateContact2VersionNumber(int.Parse(results.OrderByDescending(x => x.SYS_CHANGE_VERSION).FirstOrDefault().SYS_CHANGE_VERSION.Value.ToString()));
                }
            }
            catch (Exception ex) { _exceptionLogging.LogException(ex); }
            return(results);
        }