示例#1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            Title = NSBundle.MainBundle.GetLocalizedString("Master", "Users");

            var addButton = new UIBarButtonItem(UIBarButtonSystemItem.Add, AddNewItem);

            addButton.AccessibilityLabel      = "addButton";
            NavigationItem.RightBarButtonItem = addButton;

            TableView.Source   = dataSource = new MainTableDataSource(this);
            TableView.Delegate = tableDelegate = new MainTableDelegate(this);
        }
示例#2
0
        private void Form2_Load(object sender, EventArgs e)
        {
            var rv = new ReportViewer {
                Dock = DockStyle.Fill
            };

            rv.LocalReport.ReportEmbeddedResource = "PeriodicTable.Report.Report1.rdlc";
            Controls.Add(rv);

            rv.LocalReport.DataSources.Add(
                new ReportDataSource("DataSet1", MainTableDataSource.Create()));
            rv.LocalReport.DataSources.Add(
                new ReportDataSource("DataSet2", SubTableDataSource.Create()));

            rv.RefreshReport();
        }
        public override void Run()
        {
            var dataSetForMainTable = CreateDataSet();
            var mainTable           = MainTable.Create(dataSetForMainTable.Name);
            var dataSetForSubTable  = CreateDataSet();
            var subTable            = SubTable.Create(dataSetForSubTable.Name);
            var body = new Body();

            body.AddReportItem(mainTable);
            body.AddReportItem(subTable);
            Report.AddReportSection(new ReportSection(body));

            Report.AddDataSet(dataSetForMainTable);
            Report.AddDataSet(dataSetForSubTable);
            DataSources.Add(new ReportDataSource(dataSetForMainTable.Name, MainTableDataSource.Create()));
            DataSources.Add(new ReportDataSource(dataSetForSubTable.Name, SubTableDataSource.Create()));

            CreateEmbeddedImages();

            base.Run();
        }