欢迎来到天天文库
浏览记录
ID:10993211
大小:1.98 MB
页数:29页
时间:2018-07-09
《外文翻译 英文文献 使用两个dropdownlist过滤的主从报表大学毕设论文.doc》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、Master/DetailFilteringWithTwoDropDownListsIntroductionIntheprevioustutorialweexaminedhowtodisplayasimplemaster/detailsreportusingasingleDropDownListpopulatedwiththecategoriesandaGridViewshowingthoseproductsthatbelongtotheselectedcategory.Thisreportpatternworkswellwhendisplayingrecordsthathav
2、eaone-to-manyrelationshipandcaneasilybeextendedtoworkforscenariosthatincludemultipleone-to-manyrelationships.Forexample,anorderentrysystemwouldhavetablesthatcorrespondtocustomers,orders,andorderlineitems.Agivencustomermayhavemultipleorderswitheachorderconsistingofmultipleitems.Suchdatacanbep
3、resentedtotheuserwithtwoDropDownListsandaGridView.ThefirstDropDownListwouldhavealistitemforeachcustomerinthedatabasewiththesecondone'scontentsbeingtheordersplacedbytheselectedcustomer.AGridViewwouldlistthelineitemsfromtheselectedorder.WhiletheNorthwinddatabaseincludethecanonicalcustomer/orde
4、r/orderdetailsinformationinitsCustomers,Orders,andOrderDetailstables,thesetablesaren'tcapturedinourarchitecture.Nonetheless,wecanstillillustrateusingtwodependentDropDownLists.ThefirstDropDownListwilllistthecategoriesandthesecondtheproductsbelongingtotheselectedcategory.ADetailsViewwillthenli
5、stthedetailsoftheselectedproduct.Step1:CreatingandPopulatingtheCategoriesDropDownListOurfirstgoalistoaddtheDropDownListthatliststhecategories.Thesestepswereexaminedindetailintheprecedingtutorial,butaresummarizedhereforcompleteness.OpentheMasterDetailsDetails.aspxpageintheFilteringfolder,adda
6、DropDownListtothepage,setitsIDpropertytoCategories,andthenclicktheConfigureDataSourcelinkinitssmarttag.FromtheDataSourceConfigurationWizardchoosetoaddanewdatasource.29Figure1:AddaNewDataSourcefortheDropDownList(Clicktoviewfull-sizeimage)Thenewdatasourceshould,naturally,beanObjectDataSource.N
7、amethisnewObjectDataSourceCategoriesDataSourceandhaveitinvoketheCategoriesBLLobject'sGetCategories()method.Figure2:ChoosetoUsetheCategoriesBLLClass(Clicktoviewfull-sizeimage)29Figure3:ConfiguretheObjectDataSourcetoUsetheGetCategories()Method(Clickt
此文档下载收益归作者所有