Ejemplo n.º 1
0
        private void Init(string detailTypeCode, decimal?min, decimal?max, CodeSchemeVM codeScheme, List <MissingValue> missingValueModels, ResponseLayout layoutModel)
        {
            DetailTypeCode = detailTypeCode;
            Min            = min;
            Max            = max;
            CodeScheme     = codeScheme;

            DetailTypes = new ObservableCollection <Option>();
            if (response.IsTypeChoices)
            {
            }
            else if (response.IsTypeDateTime)
            {
                DetailTypes = Options.DateTimeTypes;
            }
            else if (response.IsTypeFree)
            {
            }
            else if (response.IsTypeNumber)
            {
                DetailTypes = Options.NumberTypes;
            }

            missingValues = new ObservableCollection <MissingValueVM>();
            foreach (MissingValue mv in missingValueModels)
            {
                MissingValueVM missingValue = new MissingValueVM(mv)
                {
                    Parent = this
                };
                missingValues.Add(missingValue);
            }
            modelSyncher = new ModelSyncher <MissingValueVM, MissingValue>(this, missingValues, response.MissingValues);


            ResponseLayout newLayoutModel = layoutModel;

            layout          = CreateLayout(response, layoutModel);
            response.Layout = layout.Layout;
        }
Ejemplo n.º 2
0
        private void Init(string detailTypeCode, decimal? min, decimal? max, CodeSchemeVM codeScheme, List<MissingValue> missingValueModels, ResponseLayout layoutModel)
        {
            DetailTypeCode = detailTypeCode;
            Min = min;
            Max = max;
            CodeScheme = codeScheme;

            DetailTypes = new ObservableCollection<Option>();
            if (response.IsTypeChoices)
            {
            } else if (response.IsTypeDateTime)
            {
                DetailTypes = Options.DateTimeTypes;
            }
            else if (response.IsTypeFree)
            {
            }
            else if (response.IsTypeNumber)
            {
                DetailTypes = Options.NumberTypes;
            }

            missingValues = new ObservableCollection<MissingValueVM>();
            foreach (MissingValue mv in missingValueModels)
            {
                MissingValueVM missingValue = new MissingValueVM(mv) { Parent = this };
                missingValues.Add(missingValue);
            }
            modelSyncher = new ModelSyncher<MissingValueVM, MissingValue>(this, missingValues, response.MissingValues);

            ResponseLayout newLayoutModel = layoutModel;

            layout = CreateLayout(response, layoutModel);
            response.Layout = layout.Layout;
        }