public PushDataReport()
 {
     InitializeComponent();
     items = new List <AbstractColumn>();
     _DataGrid.ItemsSource = items;
     this.context          = new PushModelContext();
     cboType.ItemsSource   = GlobalLists.DataTypeList();
     Projects = GetProjects();
     _projectsCbo.ItemsSource = Projects;
 }
Beispiel #2
0
        static List <IPrintableObject> CreateItems(PushModelContext context)
        {
            var list = new List <IPrintableObject>();

            foreach (var element in context.Items)
            {
                var dataItem = new BaseDataItem()
                {
                    Name       = element.ColumnName,
                    Text       = element.ColumnName,
                    ColumnName = element.ColumnName,
                    DataType   = element.DataTypeName
                };
                list.Add(dataItem);
            }
            AdjustItems(list, startLocation);
            return(list);
        }
        public PushDataReport()
        {
            InitializeComponent();
            items = new List <AbstractColumn>();
            _DataGrid.ItemsSource = items;
            this.context          = new PushModelContext();
            var data = new AbstractColumn("MyColumn", typeof(string));

            items.Add(data);
            cboType.ItemsSource = GlobalLists.DataTypeList();
            var definitions = GetTypeDefinitions();

            if (definitions != null)
            {
                _cboTypes.Visibility    = System.Windows.Visibility.Visible;
                _cboTypes.ItemsSource   = definitions;
                _cboTypes.SelectedIndex = 0;
            }
        }
Beispiel #4
0
        public PushDataReport()
        {
            InitializeComponent();
            items = new List <AbstractColumn>();
            _DataGrid.ItemsSource = items;
            this.context          = new PushModelContext();
            cboType.ItemsSource   = GlobalLists.DataTypeList();

            var definitions = GetTypeDefinitions();

            if (definitions.Any())
            {
                _cboTypes.Visibility    = System.Windows.Visibility.Visible;
                _availTxt.Visibility    = System.Windows.Visibility.Visible;
                _cboTypes.ItemsSource   = definitions;
                _cboTypes.SelectedIndex = 0;
            }
            else
            {
                var data = new AbstractColumn("MyColumn", typeof(string));
                items.Add(data);
                _projTxt.Text = ResourceService.GetString("SharpReport.Wizard.PushModel.NoProject");
            }
        }