如何从对象数据源传递两个值 [英] How to pass two values from object Data source

查看:78
本文介绍了如何从对象数据源传递两个值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从Object Data Source传递两个值来将结果绑定到网格。

我已经传递了它正在工作的隐藏字段值但我需要通过对象数据源传递另一个隐藏字段值。



 <   asp:ObjectDataSource     ID   =  odsAccountCloseEdit    runat   =  server    OldValuesParameterFormatString   =  original_ {0}  

< span class =code-attribute> SelectMethod = GetAccountCloseEdit TypeName = < span class =code-keyword> CoSys.AccountOperation.BLL.CAcoAccountClose

< span class =code-attribute> < span class =code-attribute> OnObjectCreating = odsAccountCloseEdit_ObjectCreating >
< SelectParameters > ;
< asp:ControlParameter ControlID = hfdMemberRegistrationId DefaultValue = - 1 名称 = memMemberRegistrationId

< span class =code-attribute>
< span class =code-attribute> PropertyNa我 = 类型 = 字符串 / >
< / SelectParameters >
< span class =code-keyword>< / asp:ObjectDataSource >

解决方案

 <   asp:ObjectDataSource     ID   =  odsD epositEdit    runat   =  server    OldValuesParameterFormatString   =  original_ {0}  
< span class =code-attribute>
< span class =code-attribute> SelectMethod = 获取AllDepositAmountEdit TypeName = CoSys.AccountOperation.BLL.CAcoTransaction

< span class =code-attribute> OnObjectCreating = odsDepositEdit_ObjectCreating >
< SelectParameters >
< asp:ControlParameter ControlID = ddlTellerName DefaultValue = - 1 名称 = UserId PropertyName = SelectedValue

类型 = Int64 / >
< asp:ControlParameter ControlID = ddlCollectorName DefaultValue = - 1 名称 = collectorId

< span class =code-attribute> PropertyName = SelectedValue 类型 = Int64 / >
< asp:ControlParameter ControlID = hfdLoginOfficeId DefaultValue = -1 名称 = loginOfficeId

PropertyName = 价值 类型 = Int64 / >
< asp:ControlParameter ControlID = hfdDate < span class =code-attribute> DefaultValue = - 1 名称 = date PropertyName =

< span class =code-attribute> 类型 = DateTime / >
< / SelectParameters >
< / asp:ObjectDataSource >


How to pass Two values from Object Data Source to bind the result to grid.
I have passed the hidden field value it is working but i need to pass another hidden field value through object data source.

<asp:ObjectDataSource ID="odsAccountCloseEdit" runat="server" OldValuesParameterFormatString="original_{0}"

                             SelectMethod="GetAccountCloseEdit" TypeName="CoSys.AccountOperation.BLL.CAcoAccountClose"

                             OnObjectCreating="odsAccountCloseEdit_ObjectCreating">
                             <SelectParameters>
                                 <asp:ControlParameter ControlID="hfdMemberRegistrationId" DefaultValue="-1" Name="memMemberRegistrationId"

                                     PropertyName="Value" Type="String" />
                             </SelectParameters>
                         </asp:ObjectDataSource>

解决方案

<asp:ObjectDataSource ID="odsDepositEdit" runat="server" OldValuesParameterFormatString="original_{0}"

                                       SelectMethod="GetAllDepositAmountEdit" TypeName="CoSys.AccountOperation.BLL.CAcoTransaction"

                                       OnObjectCreating="odsDepositEdit_ObjectCreating">
                                       <SelectParameters>
                                           <asp:ControlParameter ControlID="ddlTellerName" DefaultValue="-1" Name="UserId" PropertyName="SelectedValue"

                                               Type="Int64" />
                                           <asp:ControlParameter ControlID="ddlCollectorName" DefaultValue="-1" Name="collectorId"

                                               PropertyName="SelectedValue" Type="Int64" />
                                           <asp:ControlParameter ControlID="hfdLoginOfficeId" DefaultValue="-1" Name="loginOfficeId"

                                               PropertyName="Value" Type="Int64" />
                                           <asp:ControlParameter ControlID="hfdDate" DefaultValue="-1" Name="date" PropertyName="Value"

                                               Type="DateTime" />
                                       </SelectParameters>
                                   </asp:ObjectDataSource>


这篇关于如何从对象数据源传递两个值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆