Nettiers在Web应用里数据源的几种定义方法

1,<data:T001DataSource ID="t001DataSource" runat="server" EnablePaging="True" EnableSorting="True"
        InsertMethod="Insert" SelectMethod="Find" UpdateMethod="Save">
        <DeepLoadProperties Method="IncludeChildren" Recursive="False">
        </DeepLoadProperties>
        <Parameters>
        <data:SqlParameter Name="Parameters">
        <Filters>
        <data:T001ExpressionBuilder BuilderExpression="AppendLike" Column="dm" ControlID="NameList"></data:T001ExpressionBuilder>
        <data:T001ExpressionBuilder BuilderExpression="AppendEquals" Column="C0137" DefaultValue="01"></data:T001ExpressionBuilder>
        <data:T001ExpressionBuilder BuilderExpression="AppendEquals" Column="C0136" DefaultValue="00"></data:T001ExpressionBuilder>
        </Filters>
        </data:SqlParameter>
        </Parameters>
    </data:T001DataSource>

2,<data:EntityDataSource ID="EntityDataSource1" runat="server" TypeName="RSINFO.Data.DataRepository,RSINFO.Data" TypeProperty=""
      ProviderName="" EntityTypeName="" EntityKeyTypeName="System.Guid" EntityKeyName="" SelectMethod="GetAll" InsertMethod="Insert"
 UpdateMethod="Update" DeleteMethod="Delete" EnablePaging="false" EnableSorting="false" EnableTransaction="true" InsertDateTimeNames="" 
 UpdateDateTimeNames="" Filter="" Sort="">
</data:EntityDataSource>

3,<data:EntityDataSource ID="CustomersDataSource" runat="server"
    ProviderName="CustomersProvider"
    EntityTypeName="Northwind.BLL.Customers, Northwind.BLL"
    SelectMethod="GetPaged"
    EnablePaging="True"
    EnableSorting="True"
>
    <Parameters>
        <data:CustomParameter Name="WhereClause" Value="Country = 'USA'" ConvertEmptyStringToNull="false" />
        <data:CustomParameter Name="OrderByClause" Value="CompanyName ASC" ConvertEmptyStringToNull="false" />
        <asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex" Type="Int32" />
        <asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize" Type="Int32" />
        <data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
    </Parameters>
</data:EntityDataSource> 

4,<data:CustomersDataSource ID="CustomersDataSource1" runat="server"
    SelectMethod="GetPaged" EnablePaging="true" EnableSorting="true">
    <Parameters>
       <data:SqlParameter Name="WhereClause" UseParameterizedFilters="false">
          <Filters>
             <data:CustomersFilter Column="Country" ControlID="CountryList" />
          </Filters>
       </data:SqlParameter>
    </Parameters>
</data:CustomersDataSource>

你可能感兴趣的:(Web,server,filter,insert,asp,Parameters)