我正在尝试过滤网格视图以显示特定日期之间的订单。我设法让它工作,但它没有显示日期的记录。它只显示这些日期之间的时间。Date from 中存在的记录显示...
<asp:EntityDataSource ID="EDS_Orders" runat="server" EnableUpdate="true" EnableFlattening="False" OrderBy="it.Order_date ASC"
ConnectionString="name=Bohemian1Entities" DefaultContainerName="Bohemian1Entities" EntitySetName="t_customer_orders"
Where="it.UserName is not null and (it.Order_date Between @DateFrom AND @DateTo) AND (it.UserName Like '%' + @UserName + '%') " >
<WhereParameters>
<asp:ControlParameter ControlID="ddlDateFrom" Name="DateFrom"
Type="DateTime" DefaultValue="%"/>
<asp:ControlParameter ControlID="ddlDateTo" Name="DateTo"
Type="DateTime" DefaultValue="%"/>
<asp:ControlParameter ControlID="ddlCustomers" Name="UserName" PropertyName="Text"
Type="String" DefaultValue="%"/>
</WhereParameters>
</asp:EntityDataSource>