Ejemplo n.º 1
0
        public async Task <bool> UpdatePtcAccount(PtcAccount account)
        {
            MSPtcAccount            mspa   = PtcAccount.ConvertToMSPtcAccount(account);
            List <MSStorageAccount> saList = new List <MSStorageAccount>();
            await App.MobileService.GetTable <MSPtcAccount>().UpdateAsync(mspa);

            this.myAccount = account;
            return(true);
        }
Ejemplo n.º 2
0
        public async Task <bool> DeletePtcAccount(PtcAccount account)
        {
            MSPtcAccount mspa = PtcAccount.ConvertToMSPtcAccount(account);
            await App.MobileService.GetTable <MSPtcAccount>().DeleteAsync(mspa);

            App.ApplicationSettings.Remove(PTCACCOUNT_ID);
            App.ApplicationSettings.Save();
            this.myAccount = null;
            return(true);
        }
Ejemplo n.º 3
0
        public async Task <bool> CreateNewPtcAccountAsync(PtcAccount account)
        {
            MSPtcAccount mspa = PtcAccount.ConvertToMSPtcAccount(account);
            PtcAccount   p    = await this.GetPtcAccountAsync(account.Email);

            if (p != null)
            {
                return(false);
            }
            await App.MobileService.GetTable <MSPtcAccount>().InsertAsync(mspa);

            this.SavePtcId(account.Email, account.ProfilePassword);
            this.myAccount = account;
            return(true);
        }