private void _databaseBox_SelectedIndexChanged ( object sender, EventArgs e ) { _web.Navigate("about:blank"); _allBox.Items.Clear(); _foundBox.Items.Clear(); _modeBox.Checked = false; string database = ((DatabaseInfo)_databaseBox.SelectedItem).Name; DatabaseInfo info = _client.GetDatabaseInfo(database); _deletedRecords = info.LogicallyDeletedRecords; _allBox.BeginUpdate(); foreach (int mfn in _deletedRecords) { _allBox.Items.Add(mfn); } _allBox.EndUpdate(); if (_formatBox.Items.Count != 0) { _formatBox.SelectedIndex = 0; } _SetStatus("Всего удалённых записей: {0}", _deletedRecords.Length); if (_allBox.Items.Count != 0) { _allBox.SelectedIndex = 0; } }
public void DatabaseInfo_Test1() { IrbisConnection connection = Connection .ThrowIfNull("Connection"); connection.ReadRecord("IBIS", 3, true, null); DatabaseInfo info = connection.GetDatabaseInfo("IBIS"); Write(info); Write(" "); connection.UnlockRecords("IBIS", 3); info = connection.GetDatabaseInfo("IBIS"); Write(info); Write(" "); }
private void DatabaseList_SelectionChanged ( object sender, SelectionChangedEventArgs e ) { DatabaseInfo selectedDatabase = DatabaseList.SelectedItem as DatabaseInfo; if (ReferenceEquals(selectedDatabase, null)) { return; } string name = selectedDatabase.Name.ThrowIfNull(); DatabaseDescription description = new DatabaseDescription { Name = name, Description = selectedDatabase.Description }; using (IrbisConnection connection = GetConnection()) { DatabaseInfo info = connection.GetDatabaseInfo(name); description.MaxMfn = info.MaxMfn - 1; description.ExclusiveLock = info.DatabaseLocked; description.LockedRecords = info.LockedRecords.SafeLength(); description.LogicallyDeleted = info.LogicallyDeletedRecords.SafeLength(); description.PhysicallyDeleted = info.PhysicallyDeletedRecords.SafeLength(); description.NonactualizedRecords = info.NonActualizedRecords.SafeLength(); } DataContext = description; }