예제 #1
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (this.IsPostBack == false)
     {
         // 初始化页面语言
         this.InitPageLanguage(this.languageComponent1, false);
         ReportViewFacade rptFacade = new ReportViewFacade(this.DataProvider);
         object[]         objsDS    = rptFacade.GetAllRptViewDataSource();
         this.drpDataSource.Items.Clear();
         if (objsDS != null)
         {
             for (int i = 0; i < objsDS.Length; i++)
             {
                 RptViewDataSource dataSource = (RptViewDataSource)objsDS[i];
                 this.drpDataSource.Items.Add(new ListItem(dataSource.Name, dataSource.DataSourceID.ToString()));
             }
         }
     }
 }
예제 #2
0
        private void InitData()
        {
            this.drpReportFilterType.Items.Add(new ListItem(this.languageComponent1.GetString(ReportFilterUIType.InputText), ReportFilterUIType.InputText));
            this.drpReportFilterType.Items.Add(new ListItem(this.languageComponent1.GetString(ReportFilterUIType.Date), ReportFilterUIType.Date));
            this.drpReportFilterType.Items.Add(new ListItem(this.languageComponent1.GetString(ReportFilterUIType.CheckBox), ReportFilterUIType.CheckBox));
            this.drpReportFilterType.Items.Add(new ListItem(this.languageComponent1.GetString(ReportFilterUIType.DropDownList), ReportFilterUIType.DropDownList));
            this.drpReportFilterType.Items.Add(new ListItem(this.languageComponent1.GetString(ReportFilterUIType.SelectQuery), ReportFilterUIType.SelectQuery));
            this.drpReportFilterType.Items.Add(new ListItem(this.languageComponent1.GetString(ReportFilterUIType.SelectComplex), ReportFilterUIType.SelectComplex));

            this.drpDDLDynamicDataSource.Items.Add(new ListItem("", ""));
            ReportViewFacade facade = new ReportViewFacade(this.DataProvider);

            object[] objs = facade.GetAllRptViewDataSource();
            if (objs != null)
            {
                for (int i = 0; i < objs.Length; i++)
                {
                    this.drpDDLDynamicDataSource.Items.Add(new ListItem(((RptViewDataSource)objs[i]).Name, ((RptViewDataSource)objs[i]).DataSourceID.ToString()));
                }
            }
        }