Beispiel #1
0
		public static int InsertOrUpdateQA(QA qa){
			var lookup = MobileService.GetTable<QA> ().LookupAsync (qa.id);
			if (lookup == null || qa.id == null) {
				QATable.InsertAsync (qa);
			} else {
				QATable.UpdateAsync (qa);
			}
			MobileService.SyncContext.PushAsync();
			return 1;
		}
Beispiel #2
0
        public static int InsertOrUpdateQA(QA qa)
        {
            var lookup = MobileService.GetTable <QA> ().LookupAsync(qa.id);

            if (lookup == null || qa.id == null)
            {
                QATable.InsertAsync(qa);
            }
            else
            {
                QATable.UpdateAsync(qa);
            }
            MobileService.SyncContext.PushAsync();
            return(1);
        }