private void FillTable()
        {
            try
            {
                if (textBoxSearch.Text.Trim() == "")
                {
                    dataGridViewHistory.DataSource = DataMethod.ChangesTable(_fileStruct.fileId);
                }
                else
                {
                    dataGridViewHistory.DataSource = DataMethod.SearchChanges(_fileStruct.fileId, textBoxSearch.Text);
                }

                if (dataGridViewHistory.DataSource != null)
                {
                    dataGridViewHistory.Columns[0].HeaderText = "Что изменилось";
                    dataGridViewHistory.Columns[1].HeaderText = "Кто изменил";
                    dataGridViewHistory.Columns[2].HeaderText = "Дата изменения";
                    dataGridViewHistory.RowHeadersDefaultCellStyle.Padding = new Padding(dataGridViewHistory.RowHeadersWidth);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #2
0
 private void RefreshTable()
 {
     this.dataGridViewHistory.DataSource = DataMethod.ChangesTable(_fileStruct.fileId);
 }