Exemple #1
0
        public IntegratedView reconnect(DataGridView dataGrid)
        {
            //  DataManager dm = new DataManager(database);
            string         viewName = dataGrid.Name;
            IntegratedView view     = database.getView(viewName);

            dataGrid.AutoGenerateColumns = false;
            dataGrid.DataSource          = view.Table;
            if (views.ContainsKey(viewName))
            {
                views.Remove(viewName);
            }
            views.Add(viewName, view);

            foreach (SzpifColumn column in view.Columns.Values)
            {
                if (column.CanUpdate && view.Table.Columns.Contains(column.Name) == false)
                {
                    view.Table.Columns.Add(new DataColumn(column.Name));
                }
            }
            return(view);
        }
Exemple #2
0
        public ICollection <string> getColumnValuesFromView(string viewName, string columnName)
        {
            IntegratedView view = database.getView(viewName);

            return(DataManager.getValues(view.Table, columnName));
        }