愛麗絲的心情

關於部落格
點點滴滴皆是記錄
步步痕跡皆是煩惱
  • 58914

    累積人氣

  • 1

    今日人氣

    0

    訂閱人氣

Nettiers TList.ToDataSet

http://nettiers.com/ComponentLayer.ashx
Service API Example:

1 //Create a new Service Workspace object to work with; 2 AccountService accountsService = new AccountsService(); 3 4 //Create an entity to use in examples; 5 Account accountEntity = new Account(); 6 accountEntity.AccountName = "MyAccountName"; 7 accountEntity.CreatedDate = DateTime.Now; 8 9 //GetAll()10 TList<Accounts> accountList = accountsService.GetAll(); 1112 //Find()13 TList<Accounts> accountList = accountsService.Find("IsActive = 1"); 1415 //GetPaged()16 TList<Accounts> accountList = 17 accountsService.GetPaged("IsActive = 1 AND AccountName LIKE 'smi%'"); 1819 //GetByFk()20 TList<Accounts> accountList = accountsService.GetByCustomerId(25); 2122 //GetIX()23 TList<Accounts> accountList = 24 accountsService.GetByAccountCreatedDate(new DateTime("1/1/2006")); 252627 //Get()28 Accounts account = accountsService.Get(new AccountsKey(23)); 2930 //Insert()31 accountsService.Insert(accountEntity); 32 Response.Write(accountEntity.AccountId); // is now populated 3334 //Delete()35 bool result = accountsService.Delete(accountEntity); 3637 //Delete()38 bool result = accountsService.Delete(23); 3940 //Update()41 accountEntity.AccountName = "MyAccountName 2"; 42 accountsService.Update(accountEntity); 4344 //GetByManyToManyl()45 TList<Customers> accountList = accountsService.GetCustomers_From_AccountsReceivable(); 4647 //GetCustomProcedureName()48 TList<Accounts> accountList = accountsService.GetByAccountMaturationDate(); 49 5051 //DeepLoadByIdl() using PK52 Account account = accountsService.DeepLoadByAccountId( 53 id, false, DeepLoadType.IncludeChildren, typeof(Customers), typeof(TList<ChartOfAccounts>)); 5455 //DeepLoadByIdl() using FK56 TList<Account> account = accountsService.DeepLoadByCustomerId( 57 id, false, DeepLoadType.IncludeChildren, typeof(Customers), typeof(TList<ChartOfAccounts>)); 5859 //already instatiated objects//DeepLoad60 accountsService.DeepLoad( 61 myAccountEntity, false,DeepLoadType.IncludeChildren, typeof(Customers), typeof(TList<ChartOfAccounts>)); 6263 // is now filled64 Response.Write(accountsService.CustomerIdSource.LastName); 6566 // is now filled67 Response.Write(accountsService.ChartOfAccountsCollection.Count); 6869 //DeepSave70 accountsService.DeepSave( 71 myAccountEntity, false, DeepSaveType.IncludeChildren, typeof(Customers), typeof(TList<ChartOfAccounts>));
相簿設定
標籤設定
相簿狀態