Click here to Skip to main content
15,886,873 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="Suppliers" conflictDetection="overwriteChanges" label="Suppliers" xmlns="urn:schemas-codeontime-com:data-aquarium">
  <commands>
    <command id="command1" type="Text">
      <text>
        <![CDATA[
select
	"Suppliers"."SupplierID" "SupplierID"
	,"Suppliers"."CompanyName" "CompanyName"
	,"Suppliers"."ContactName" "ContactName"
	,"Suppliers"."ContactTitle" "ContactTitle"
	,"Suppliers"."Address" "Address"
	,"Suppliers"."City" "City"
	,"Suppliers"."Region" "Region"
	,"Suppliers"."PostalCode" "PostalCode"
	,"Suppliers"."Country" "Country"
	,"Suppliers"."Phone" "Phone"
	,"Suppliers"."Fax" "Fax"
	,"Suppliers"."HomePage" "HomePage"
from "dbo"."Suppliers" "Suppliers"
]]>
      </text>
    </command>
    <command id="SupplierIDIdentityCommand" type="Text" event="Inserted">
      <text>select @@identity</text>
      <output>
        <fieldOutput fieldName="SupplierID" />
      </output>
    </command>
  </commands>
  <fields>
    <field name="SupplierID" type="Int32" allowNulls="false" isPrimaryKey="true" label="Supplier#" readOnly="true" />
    <field name="CompanyName" type="String" allowNulls="false" label="Company Name" />
    <field name="ContactName" type="String" label="Contact Name" />
    <field name="ContactTitle" type="String" label="Contact Title" />
    <field name="Address" type="String" label="Address" />
    <field name="City" type="String" label="City" />
    <field name="Region" type="String" label="Region" />
    <field name="PostalCode" type="String" label="Postal Code" />
    <field name="Country" type="String" label="Country" />
    <field name="Phone" type="String" label="Phone" />
    <field name="Fax" type="String" label="Fax" />
    <field name="HomePage" type="String" allowQBE="false" allowSorting="false" label="Home Page" />
  </fields>
  <views>
    <view id="grid1" type="Grid" commandId="command1" label="Suppliers">
      <headerText>This is a list of suppliers. </headerText>
      <dataFields>
        <dataField fieldName="CompanyName" columns="40" />
        <dataField fieldName="ContactName" columns="30" />
        <dataField fieldName="ContactTitle" columns="30" />
        <dataField fieldName="Address" />
        <dataField fieldName="City" columns="15" />
        <dataField fieldName="Region" columns="15" />
        <dataField fieldName="PostalCode" columns="10" />
        <dataField fieldName="Country" columns="15" />
        <dataField fieldName="Phone" columns="24" />
        <dataField fieldName="Fax" columns="24" />
      </dataFields>
    </view>
    <view id="editForm1" type="Form" commandId="command1" label="Review Suppliers">
      <headerText>Please review suppliers 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="Suppliers">
          <description>These are the fields of the suppliers record that can be edited.</description>
          <dataFields>
            <dataField fieldName="CompanyName" columns="40" />
            <dataField fieldName="ContactName" columns="30" />
            <dataField fieldName="ContactTitle" columns="30" />
            <dataField fieldName="Address" />
            <dataField fieldName="City" columns="15" />
            <dataField fieldName="Region" columns="15" />
            <dataField fieldName="PostalCode" columns="10" />
            <dataField fieldName="Country" columns="15" />
            <dataField fieldName="Phone" columns="24" />
            <dataField fieldName="Fax" columns="24" />
            <dataField fieldName="HomePage" rows="5" />
          </dataFields>
        </category>
      </categories>
    </view>
    <view id="createForm1" type="Form" commandId="command1" label="New Suppliers">
      <headerText>Please fill this form and click OK button to create a new suppliers record. Click Cancel to return to the previous screen.</headerText>
      <categories>
        <category headerText="New Suppliers">
          <description>Complete the form. Make sure to enter all required fields.</description>
          <dataFields>
            <dataField fieldName="CompanyName" columns="40" />
            <dataField fieldName="ContactName" columns="30" />
            <dataField fieldName="ContactTitle" columns="30" />
            <dataField fieldName="Address" />
            <dataField fieldName="City" columns="15" />
            <dataField fieldName="Region" columns="15" />
            <dataField fieldName="PostalCode" columns="10" />
            <dataField fieldName="Country" columns="15" />
            <dataField fieldName="Phone" columns="24" />
            <dataField fieldName="Fax" columns="24" />
            <dataField fieldName="HomePage" rows="5" />
          </dataFields>
        </category>
      </categories>
    </view>
  </views>
  <actions>
    <actionGroup scope="Grid">
      <action commandName ="Select"/>
      <action commandName="Select" commandArgument="editForm1" headerText="View Supplier Details"/>
      <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 Suppliers" description="Create a new Suppliers 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