private int initInValues(DataTable tablePar, DataTable tableVal) { int iRes = 0; MODE_DEV mDev = MODE_DEV.UNKNOWN; iRes = initValues(In, tablePar, tableVal); if (In.ContainsKey(@"74") == true) { _modeDev = new Dictionary <int, MODE_DEV>(); for (int i = (int)INDX_COMP.iBL1; (i < (int)INDX_COMP.COUNT) && (iRes == 0); i++) { switch ((int)In[@"74"][ID_COMP[i]].value) { case 1: //[MODE_DEV].1 - Конденсационный mDev = MODE_DEV.COND_1; break; case 2: //[MODE_DEV].2 - Электр.граф (2 ст.) mDev = MODE_DEV.ELEKTRO2_2; break; case 3: //[MODE_DEV].2а - Электр.граф (1 ст.) mDev = MODE_DEV.ELEKTRO1_2a; break; case 4: //[MODE_DEV].3 - По тепл. граф. mDev = MODE_DEV.TEPLO_3; break; default: iRes = -1; logErrorUnknownModeDev(@"InitInValues", ID_COMP[i]); break; } if ((_modeDev.ContainsKey(i) == false) && (!(mDev == MODE_DEV.UNKNOWN))) { _modeDev.Add(i, mDev); } else { ; } } } else { iRes = -1; Logging.Logg().Error(@"TaskTepCalculate::initInValues () - во входной таблице не установлен режим оборудования...", Logging.INDEX_MESSAGE.NOT_SET); } return(iRes); }
private ImmutableList <IEntity> GetInStream() { var callLog = Log.Call <ImmutableList <IEntity> >(); // Check if in not connected, in which case we must find it yourself if (!In.ContainsKey(Eav.Constants.DefaultStreamName)) { var showDrafts = Block?.Context?.UserMayEdit ?? false; Log.Add($"In not attached, will auto-attach with showDrafts: {showDrafts}"); var publishing = DataSourceFactory.GetPublishing(this, showDrafts, Configuration.LookUpEngine); Attach(publishing); } return(callLog(null, In[Eav.Constants.DefaultStreamName].List.ToImmutableList())); }