Beispiel #1
0
 private void sverPDataGrid_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == sverPDataGrid.Columns[SveraParam.ColDatagridNames.Redact].Index)
     {
         if (SveraB.RowNamesShort[e.RowIndex].redact == true)
         {
             if (sverPDataGrid.Rows[e.RowIndex].Tag.ToString() == SveraParam.RowsDatagridNames.vedRabotTable)
             {
                 VedTableForm ved = new VedTableForm(SveraB.FromDataBaseWideForSvera.VedRabotTable);
                 if (ved.ShowDialog(this) == DialogResult.OK)
                 {
                     SveraB.FromDataBaseWideForSvera.VedRabotTable = ved.VedTableP;
                 }
             }
             else
             {
                 RedactText red = new RedactText(sverPDataGrid.Rows[e.RowIndex].Cells[SveraParam.ColDatagridNames.Value].Value.ToString());
                 if (red.ShowDialog(this) == DialogResult.OK)
                 {
                     sverPDataGrid.Rows[e.RowIndex].Cells[SveraParam.ColDatagridNames.Value].Value = red.RedactRichBox.Text;
                     SveraParam.ChangeData(sverPDataGrid, SveraB.FromDataBaseWideForSvera, objectEditDataGrid, load, e.RowIndex, sverPDataGrid.Columns[SveraParam.ColDatagridNames.Value].Index);
                 }
             }
         }
     }
 }
 private void Svoystva(int colInd, int rowInd)
 {
     if (colInd > -1 && rowInd > -1)
     {
         if (colInd == sverPDataGrid.Columns[VedTable.ColDatagridExportNames.table].Index)
         {
             VedTableForm vedF = new VedTableForm(ved.VedT[rowInd].Table);
             if (vedF.ShowDialog(this) == DialogResult.OK)
             {
                 ved.MakeTableRevicionChange(rowInd, vedF.VedTableP);
                 sverPDataGrid.Refresh();
             }
         }
     }
 }