Пример #1
0
        /// <summary>
        /// Record the last sync date and time on the users record in the database.
        /// </summary>
        private bool UpdateLastSync(Common user)
        {
            bool result = false;

            if (user.sp_GetLogin == null)
            {
                return(result);
            }

            lock (Authenticated)
            {
                if (Authenticated.Count > 0 && Authenticated.Contains(user.sp_GetLogin.FirstOrDefault().sessionid))
                {
                    using (CommonTableAdapters.QueriesTableAdapter queries = new CommonTableAdapters.QueriesTableAdapter())
                    {
                        queries.sp_UpdateLastSync(user.sp_GetLogin.First().user_id);
                        result = true;
                    }
                }
                else
                {
                    //not authenticated
                    throw new FaultException("UpdateLastSync-1: Session not authenticated.");
                }
            }

            return(result);
        }
Пример #2
0
        /// <summary>
        /// Record the last sync date and time on the users record in the database.
        /// </summary>
        private bool UpdateLastSync(Common user)
        {
            bool result = false;

            if (user.sp_GetLogin == null)
            {
                return result;
            }

            lock (Authenticated)
            {
                if (Authenticated.Count > 0 && Authenticated.Contains(user.sp_GetLogin.FirstOrDefault().sessionid))
                {
                    using (CommonTableAdapters.QueriesTableAdapter queries = new CommonTableAdapters.QueriesTableAdapter())
                    {
                        queries.sp_UpdateLastSync(user.sp_GetLogin.First().user_id);
                        result = true;
                    }
                }
                else
                {
                    //not authenticated
                    throw new FaultException("UpdateLastSync-1: Session not authenticated.");
                }
            }

            return result;
        }