Click here to Skip to main content
15,891,751 members
Articles / Web Development / ASP.NET

ASP.NET/AJAX 3.5 With Aquarium Express

Rate me:
Please Sign up or sign in to vote.
3.60/5 (7 votes)
18 Sep 2008Ms-PL12 min read 35.7K   954   29  
Learn to build modern AJAX and ASP.NET 3.5 applications with free Aquarium Express Framework
<dataController name="CustomerCustomerDemo" conflictDetection="overwriteChanges" label="Customer Demo" xmlns="urn:schemas-codeontime-com:data-aquarium">
  <commands>
    <command id="command1" type="Text">
      <text><![CDATA[
select
	"CustomerCustomerDemo"."CustomerID" "CustomerID"
	,"Customer"."CompanyName" "CustomerCompanyName"
	,"CustomerCustomerDemo"."CustomerTypeID" "CustomerTypeID"
	,"CustomerType"."CustomerDesc" "CustomerTypeCustomerDesc"
from "dbo"."CustomerCustomerDemo" "CustomerCustomerDemo"
	left join "dbo"."Customers" "Customer" on "CustomerCustomerDemo"."CustomerID" = "Customer"."CustomerID"
	left join "dbo"."CustomerDemographics" "CustomerType" on "CustomerCustomerDemo"."CustomerTypeID" = "CustomerType"."CustomerTypeID"
]]></text>
    </command>
  </commands>
  <fields>
    <field name="CustomerID" type="String" allowNulls="false" isPrimaryKey="true" label="Customer#">
      <items style="Lookup" dataController="Customers" newDataView="createForm1" />
    </field>
    <field name="CustomerCompanyName" type="String" readOnly="true" label="Customer Company Name" />
    <field name="CustomerTypeID" type="String" allowNulls="false" isPrimaryKey="true" label="Customer Type#">
      <items style="Lookup" dataController="CustomerDemographics" newDataView="createForm1" />
    </field>
    <field name="CustomerTypeCustomerDesc" type="String" readOnly="true" allowQBE="false" allowSorting="false" label="Customer Type Customer Desc" />
  </fields>
  <views>
    <view id="grid1" type="Grid" commandId="command1" label="Customer Demo">
      <headerText>This is a list of customer demo records. </headerText>
      <dataFields>
        <dataField fieldName="CustomerID" aliasFieldName="CustomerCompanyName" />
        <dataField fieldName="CustomerTypeID" aliasFieldName="CustomerTypeCustomerDesc" />
      </dataFields>
    </view>
    <view id="editForm1" type="Form" commandId="command1" label="Review Customer Demo">
      <headerText>Please review customer demo information below. Click Edit to change this record, click Delete to delete the record, or click Cancel/Close to return back.</headerText>
      <categories>
        <category headerText="Customer Demo">
          <description>These are the fields of the customer demo record that can be edited.</description>
          <dataFields>
            <dataField fieldName="CustomerID" aliasFieldName="CustomerCompanyName" />
            <dataField fieldName="CustomerTypeID" aliasFieldName="CustomerTypeCustomerDesc" />
          </dataFields>
        </category>
      </categories>
    </view>
    <view id="createForm1" type="Form" commandId="command1" label="New Customer Demo">
      <headerText>Please fill this form and click OK button to create a new customer demo record. Click Cancel to return to the previous screen.</headerText>
      <categories>
        <category headerText="New Customer Demo">
          <description>Complete the form. Make sure to enter all required fields.</description>
          <dataFields>
            <dataField fieldName="CustomerID" aliasFieldName="CustomerCompanyName" />
            <dataField fieldName="CustomerTypeID" aliasFieldName="CustomerTypeCustomerDesc" />
          </dataFields>
        </category>
      </categories>
    </view>
  </views>
  <actions>
    <actionGroup scope="Grid">
      <action commandName="Select" commandArgument="editForm1" />
      <action commandName="Edit" />
      <action commandName="Delete" confirmation="Delete?" />
      <action whenLastCommandName="Edit" commandName="Update" headerText="Save" />
      <action whenLastCommandName="Edit" commandName="Cancel" />
    </actionGroup>
    <actionGroup scope="Form">
      <action commandName="Edit" />
      <action commandName="Delete" confirmation="Delete?" />
      <action commandName="Cancel" headerText="Close" />
      <action whenLastCommandName="Edit" commandName="Update" headerText="OK" />
      <action whenLastCommandName="Edit" commandName="Delete" confirmation="Delete?" />
      <action whenLastCommandName="Edit" commandName="Cancel" />
      <action whenLastCommandName="New" commandName="Insert" headerText="OK" />
      <action whenLastCommandName="New" commandName="Cancel" />
    </actionGroup>
    <actionGroup scope="ActionBar" headerText="New">
      <action commandName="New" commandArgument="createForm1" headerText="New Customer Demo" description="Create a new Customer Demo record." />
    </actionGroup>
    <actionGroup scope="ActionBar" headerText="Actions">
      <action commandName="Custom" commandArgument="ExportCsv" headerText="Export to Spreadsheet" description="Analyze items with spreadsheet&lt;br/&gt; application." cssClass="ExportCsv" />
      <action commandName="Custom" commandArgument="ExportRss" headerText="View RSS Feed" description="Syndicate items with an RSS reader." cssClass="ExportRss" />
      <action />
      <action commandName="Custom" commandArgument="MyCommand" headerText="My Command" description="Execute my custom command" />
    </actionGroup>
    <actionGroup scope="ActionBar" headerText="Record">
      <action whenLastCommandName="Edit" commandName="Update" headerText="Save" description="Save changes to the database." />
      <action whenLastCommandName="Edit" commandName="Cancel" description="Cancel all record changes." />
    </actionGroup>
  </actions>
</dataController>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
This is a Organisation

1 members

Comments and Discussions