Esempio n. 1
0
        public async void Approve()
        {
            if (TextResource != null)
            {
                NetworkConnectionActive = true;
                var operation = TableOperation.InsertOrReplace(TextResource);
                TextResource.LastUpdatedDate = DateTime.Now;
                TextResource.Approved        = true;
                TextResources.Remove(TextResource);
                await _table.ExecuteAsync(operation);

                TextResource            = null;
                TextResourceCopy        = null;
                NetworkConnectionActive = false;
            }
        }
Esempio n. 2
0
        public async void Save()
        {
            if (TextResource != null)
            {
                NetworkConnectionActive = true;
                var addChangedOperation = TableOperation.InsertOrReplace(TextResourceCopy);
                TextResourceCopy.CreationDate    = DateTime.Now;
                TextResourceCopy.LastUpdatedDate = DateTime.Now;
                await _edits.ExecuteAsync(addChangedOperation);

                TextResource.Edits           = true;
                TextResource.LastUpdatedDate = DateTime.Now;

                var replaceOperation = TableOperation.Replace(TextResource);
                await _table.ExecuteAsync(replaceOperation);

                TextResources.Remove(TextResource);

                TextResource            = null;
                TextResourceCopy        = null;
                NetworkConnectionActive = false;
            }
        }