Ejemplo n.º 1
0
        private void ObtainProfilesDefinitions()
        {
            //create profiles reader instance
            AlarmProfileReader reader = new AlarmProfileReader(_realmProvider);

            //for every identity to export
            foreach (var item in _profilesIDlidt)
            {
                //get single profile definition
                AlarmProfileDefinition definition = reader.GetAlarmProfileDefinition(item);

                //translate DB alarm profile definition into export model
                AlarmProfileDefinitionExportModel exportModel = new AlarmProfileDefinitionExportModel()
                {
                    Identity       = definition.Identity,
                    CreatedBy      = definition.CreatedBy,
                    ModifiedBy     = definition.ModifiedBy,
                    ProfileName    = definition.ProfileName,
                    ProfileComment = definition.ProfileComment,
                };

                //create object of export list
                FullAlarmProfileDefinition fullDefinition = new FullAlarmProfileDefinition()
                {
                    AlarmProfileDefinition = exportModel,
                    NoErrors = true,
                };

                //add new full definition to list
                _profilesDefinitionsList.Add(fullDefinition);
            }
        }
Ejemplo n.º 2
0
        private void GetProfilesNames()
        {
            //instance of profile reader
            AlarmProfileReader reader = new AlarmProfileReader(_realmProvider);

            //assign profile name for all alarms
            foreach (var item in _alarmsData)
            {
                item.AlarmProfileName = reader.GetAlarmProfileDefinition(item.AlarmProfileIdentity).ProfileName;
            }
        }