private void dataTable2_RowChanged(object sender, DataRowChangeEventArgs e)
 {
     // перенос изменений в таблицу срезов
     if (e.Action == DataRowAction.Change && selSrez != null)
     {
         DataRow           row     = e.Row;
         int               cnlNum  = (int)row["CnlNum"];
         SrezTable.CnlData cnlData = new SrezTableLight.CnlData((double)row["Val"], (int)row["Stat"]);
         selSrez.SetCnlData(cnlNum, cnlData);
         srezTable.MarkSrezAsModified(selSrez);
     }
 }
 private void dataTable2_RowChanged(object sender, DataRowChangeEventArgs e)
 {
     // transfer the changes to the snapshot table
     if (e.Action == DataRowAction.Change && selSrez != null)
     {
         DataRow           row     = e.Row;
         int               cnlNum  = (int)row["CnlNum"];
         SrezTable.CnlData cnlData = new SrezTableLight.CnlData((double)row["Val"], (int)row["Stat"]);
         selSrez.SetCnlData(cnlNum, cnlData);
         srezTable.MarkSrezAsModified(selSrez);
     }
 }
Exemple #3
0
        private void DataTable_RowChanged(object sender, DataRowChangeEventArgs e)
        {
            // pass row changes from dataTable to srezTable
            if (e.Action == DataRowAction.Change)
            {
                DataRow             row = e.Row;
                SrezTableLight.Srez srez;

                if (srezTable.SrezList.TryGetValue((DateTime)row["DateTime"], out srez))
                {
                    SrezTable.CnlData cnlData = new SrezTableLight.CnlData((double)row["Val"], (int)row["Stat"]);
                    srez.SetCnlData((int)row["CnlNum"], cnlData);
                    srezTable.MarkSrezAsModified(srez as SrezTable.Srez);
                }
            }
        }