Ejemplo n.º 1
0
        private void SaveData()
        {
            var pETETCStage = CETCManagerApp.Instance.m_pETETCStage;
            pETETCStage.m_nTempUnit = m_nTempUnit.SelectedIndex;
            pETETCStage.m_nTempUnit = m_nTempUnit.SelectedIndex;

            pETETCStage.m_AnalyseCondition.Clear();

            for (int row = 0; row < GV_PageAnalysis.RowCount; row++)
            {
                CETAnalyseCondition item = new CETAnalyseCondition()
                {
                    m_nID = row,
                    m_nShowStatus = (bool)GV_PageAnalysis.GetRowCellValue(row, "m_nShowStatus"),
                    m_nConditionType = repositoryItemComboBox1.Items.IndexOf(GV_PageAnalysis.GetRowCellValue(row, "m_nConditionType")),
                    m_strCaption = GV_PageAnalysis.GetRowCellValue(row, "m_strCaption").ToString(),
                    m_fBeginRangle = GV_PageAnalysis.GetRowCellValue(row, "m_fBeginRangle").ToDouble(),
                    m_fEndRangle = GV_PageAnalysis.GetRowCellValue(row, "m_fEndRangle").ToDouble(),
                    m_fBeginCondition = GV_PageAnalysis.GetRowCellValue(row, "m_fBeginCondition").ToDouble(),
                    m_fEndCondition = GV_PageAnalysis.GetRowCellValue(row, "m_fEndCondition").ToDouble(),
                    m_bReadonly = (bool)GV_PageAnalysis.GetRowCellValue(row, "m_bReadonly")
                };
                pETETCStage.m_AnalyseCondition.Add(item);
            }

            pETETCStage.SaveConditions();
        }
Ejemplo n.º 2
0
 private void GV_PageAnalysis_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e)
 {
     if (!(bool)GV_PageAnalysis.GetRowCellValue(e.RowHandle, "m_bReadonly"))
     {
         //int value = 0;
         //if (int.TryParse(e.CellValue.ToString(), out value))
         if( ((SuperTag)e.Column.Tag).IDD_OPTION_ANALYSE_CONDITION_ColumnIndex == 3 ||
             ((SuperTag)e.Column.Tag).IDD_OPTION_ANALYSE_CONDITION_ColumnIndex == 4 ||
             ((SuperTag)e.Column.Tag).IDD_OPTION_ANALYSE_CONDITION_ColumnIndex == 5 ||
             ((SuperTag)e.Column.Tag).IDD_OPTION_ANALYSE_CONDITION_ColumnIndex == 6)
         {
             e.RepositoryItem = rite;
         }
     }
     else
     {
         if (e.CellValue.ToString() == "---")
         {
             e.RepositoryItem = riteReadonly;
         }
     }
 }