def test_account__update_account(self): service = AccountService() modelAcc = service.get_account_byId( '19C715AB-AE97-4A67-B142-CDA388D9F76B') modelAcc.Pw = 'ASdwpvb&*euz*^' data = service.update_account(modelAcc) # ServiceTestCase.Entity.print_ValueEntityClass(data) self.assertIsNotNone(data, '###Error Message: No data')
def onSave(self, event): result = None service = AccountService() modelAcc = service.Account modelAcc.Username = self.txtUsername.GetValue() modelAcc.IsBooker = self.chkIsBooker.GetValue() is True and 1 or 0 modelAcc.IsAvailable = self.chkIsClientAvailable.GetValue( ) is True and 1 or 0 accountId = self.txtAccountId.GetValue() if not accountId: result = service.add_account(modelAcc) else: modelAcc.AccountId = accountId result = service.update_account(modelAcc) service.ec.print_ValueEntityClass(result)