public DocumentViewModel(string userLogin, MainWindow mainWindow = null, string selectedEntity = "")
 {
     db                = new Database(userLogin);
     _userLogin        = userLogin;
     _selectedEntity   = selectedEntity;
     entitiesViewModel = new EntitiesViewModel(userLogin);
     _mainWindow       = mainWindow;
 }
Esempio n. 2
0
        //public ObservableCollection<DocumentView> data { get; set; }

        public MainWindow(string userLogin)
        {
            InitializeComponent();
            _userLogin = userLogin;

            entityViewModel  = new EntitiesViewModel(userLogin);
            UserLogin.Header = $"Привет, {userLogin}!";

            Entities = entityViewModel.GetEntities().ToList();
            this.entitiesListBox.ItemsSource = Entities;

            //---------------
            //data = new ObservableCollection<DocumentView>();
            //this.instancesListBox.ItemsSource = data;
            //
            //if (!String.IsNullOrEmpty(entityViewModel.SelectedEntity.EntityName))
            //{
            //    var data = GetList(entityViewModel.SelectedEntity.EntityName);

            //    this.instancesListBox.ItemsSource = data;
            //}
        }