Esempio n. 1
0
		public BaseViewModel(ExceptionDetails exceptionDetails)
		{
			var modelState = new CustomObject();

			modelState.Add("HasErrors", true);
			modelState.Add("ErrorMessage", exceptionDetails.Message);
			modelState.Add("BaseExceptionMessage", exceptionDetails.BaseExceptionMessage);

			ModelState = modelState.ToExpando();
		}
Esempio n. 2
0
        public CustomObject LoadDirectory(List <ReferenceUniversalItem> result)
        {
            var dictionary = new CustomObject();

            foreach (var t in result)
            {
                if (t.ReferenceName.Equals(Constants.DeliveryCenterRef, StringComparison.OrdinalIgnoreCase))
                {
                    this.DeliveryCenterRef.Add(t);
                }
                if (t.ReferenceName.Equals(Constants.DeliveryPointRef, StringComparison.OrdinalIgnoreCase))
                {
                    this.DeliveryPointRef.Add(t);
                }
                if (t.ReferenceName.Equals(Constants.RefExpertise, StringComparison.OrdinalIgnoreCase))
                {
                    this.RefExpertise.Add(t);
                }
                if (t.ReferenceName.Equals(Constants.RefIncomingChannel, StringComparison.OrdinalIgnoreCase))
                {
                    this.RefIncomingChannel.Add(t);
                }
                if (t.ReferenceName.Equals(Constants.RefLocality, StringComparison.OrdinalIgnoreCase))
                {
                    this.RefLocality.Add(t);
                }
                if (t.ReferenceName.Equals(Constants.RefMedDocumentType, StringComparison.OrdinalIgnoreCase))
                {
                    this.RefMedDocumentType.Add(t);
                }
                if (t.ReferenceName.Equals(Constants.RefNomination, StringComparison.OrdinalIgnoreCase))
                {
                    this.RefNomination.Add(t);
                }
                if (t.ReferenceName.Equals(Constants.RefReason, StringComparison.OrdinalIgnoreCase))
                {
                    this.RefReason.Add(t);
                }
                if (t.ReferenceName.Equals(Constants.RefStatementType, StringComparison.OrdinalIgnoreCase))
                {
                    this.RefStatementType.Add(t);
                }
                if (t.ReferenceName.Equals(Constants.RefStatus, StringComparison.OrdinalIgnoreCase))
                {
                    this.RefStatus.Add(t);
                }
                if (t.ReferenceName.Equals(Constants.RefSubjectInsurance, StringComparison.OrdinalIgnoreCase))
                {
                    this.RefSubjectInsurance.Add(t);
                }
            }

            dictionary.Add(Constants.DeliveryCenterRef, this.DeliveryCenterRef);
            dictionary.Add(Constants.DeliveryPointRef, this.DeliveryPointRef);
            dictionary.Add(Constants.RefExpertise, this.RefExpertise);
            dictionary.Add(Constants.RefIncomingChannel, this.RefIncomingChannel);
            dictionary.Add(Constants.RefLocality, this.RefLocality);
            dictionary.Add(Constants.RefMedDocumentType, this.RefMedDocumentType);
            dictionary.Add(Constants.RefNomination, this.RefNomination);
            dictionary.Add(Constants.RefStatementType, this.RefStatementType);
            dictionary.Add(Constants.RefReason, this.RefReason);
            dictionary.Add(Constants.RefStatus, this.RefStatus);
            dictionary.Add(Constants.RefSubjectInsurance, this.RefSubjectInsurance);

            return(dictionary);
        }