private void MessageParameterHandler(GenericMessage<MessageArgsParameter> message)
 {
     _cellViewModel = message.Sender as CellViewModel;
     Parameters = GenericRepository.GetAllList<Y_NORM_PARAMETERS>();
     foreach (var param in message.Content.Parameters)
     {
         Parameters.Remove(param);
     }
 }
        private void MessageParameterValuesHandler(GenericMessage<MessageArgsParameterValues> message)
        {
            _valuesLeft = GenericRepository.GetParamValues(message.Content.IdParam, message.Content.Clause,
                                                              message.Content.Id);
            _groupsRight =
                new ObservableCollection<ObservableCollection<Y_NORM_MANAGEMENT_GET_PARAMETER_VALUES_Result>>();
            _valuesLeftSelected = new ObservableCollection<Y_NORM_MANAGEMENT_GET_PARAMETER_VALUES_Result>();
            _valuesRightSelected = new ObservableCollection<Y_NORM_MANAGEMENT_GET_PARAMETER_VALUES_Result>();

            SortType = 0;

            _cellViewModel = message.Sender as CellViewModel;
            foreach (var value in message.Content.Values)
            {
                if (value == null) continue;
                GroupsRight.Add(value);
                var temp = new ObservableCollection<Y_NORM_MANAGEMENT_GET_PARAMETER_VALUES_Result>();
                foreach (var parameters in value.SelectMany(param => ValuesLeft.Where(parameters => param.VALUE == parameters.VALUE)))
                {
                    temp.Add(parameters);
                }
                foreach (var par in temp)
                {
                    ValuesLeft.Remove(par);
                }
            }
            ParametersSort();
        }
Пример #3
0
 public object Clone(RowViewModel row)
 {
     var cellEntity = new Y_NORM_NORMATIVE_CELL
     {
         ID = _entity.ID,
         ID_ROW = _entity.ID_ROW,
         ID_COLUMN = _entity.ID_COLUMN,
         ID_PARAM = _entity.ID_PARAM,
         PARAM_VALUE = _entity.PARAM_VALUE,
         CONTROLLER = _entity.CONTROLLER,
         Y_NORM_NORMATIVE_CONTROLLER = _entity.Y_NORM_NORMATIVE_CONTROLLER,
         Y_NORM_NORMATIVE_ROW = row.Entity,
         Y_NORM_PARAMETERS = _entity.Y_NORM_PARAMETERS
     };
     row.Entity.Y_NORM_NORMATIVE_CELL.Add(cellEntity);
     var cell = new CellViewModel(cellEntity, row);
     return cell;
 }