Ejemplo n.º 1
0
        private TableEditorModel GetTableModel(IEnumerable <ProfileManagementModel> profiles, ProfileManagementModel profile)
        {
            var entityType = typeof(ProfileManagementModel);

            var tableModel = new TableEditorModel("Profiles", entityType, "Id", profiles, profile);

            _tableEditorService.AddColumn(tableModel, "Id", null);
            _tableEditorService.AddColumn(tableModel, "Name", null, ControlType.Input, null);

            return(tableModel);
        }
Ejemplo n.º 2
0
        private TableEditorModel GetTableModel(IEnumerable <StockManagementModel> stocks, StockManagementModel stock)
        {
            var entityType = typeof(StockManagementModel);

            var tableModel = new TableEditorModel("Stocks", entityType, "Id", stocks, stock);

            _tableEditorService.AddColumn(tableModel, "Id", null);
            _tableEditorService.AddColumn(tableModel, "Name", null, ControlType.Input, null);

            return(tableModel);
        }
Ejemplo n.º 3
0
        private TableEditorModel GetTableModel(IEnumerable <CurrencyManagementModel> currencies, CurrencyManagementModel currency)
        {
            var entityType = typeof(CurrencyManagementModel);

            var tableModel = new TableEditorModel("Currencies", entityType, "Id", currencies, currency);

            var stocks = _stockManagementService.GetStocks().OrderBy(s => s.Name);

            _tableEditorService.AddColumn(tableModel, "Id", null);
            _tableEditorService.AddColumn(tableModel, "Name", null, ControlType.Input, null);
            _tableEditorService.AddColumn(tableModel, "StockId", null, ControlType.Select, new SelectList(stocks, "Id", "Name"));

            return(tableModel);
        }
Ejemplo n.º 4
0
        private TableEditorModel GetTableModel(IEnumerable <ResourceManagementModel> entities, ResourceManagementModel entity)
        {
            var entityType = typeof(ResourceManagementModel);

            var tableModel = new TableEditorModel("Resources", entityType, "Id", entities, entity);

            var stocks = _resourceManagementService.GetStocks().OrderBy(s => s.Name);

            _tableEditorService.AddColumn(tableModel, "Id", null);
            _tableEditorService.AddColumn(tableModel, "Name", null, ControlType.Input, null);
            _tableEditorService.AddColumn(tableModel, "PriceBase", null, ControlType.Input, null);
            _tableEditorService.AddColumn(tableModel, "Price", null, ControlType.Input, null);
            _tableEditorService.AddColumn(tableModel, "Performance", null, ControlType.Input, null);
            _tableEditorService.AddColumn(tableModel, "StockId", null, ControlType.Select, new SelectList(stocks, "Id", "Name"));

            return(tableModel);
        }