Beispiel #1
0
        public ConsumerHabReviewViewModel(ConsumerHabReview model)
        {
            this.ConsumerHabReviewId = model.Id;
            this.ServiceId           = model.ServiceId;
            if (model.ServiceType != null)
            {
                this.ServiceName = model.ServiceType.Name;
            }

            if (model.ContactCHCoordinator != null)
            {
                this.CHCoordinator = new EmployeeSearchViewModel(model.ContactCHCoordinator);
            }

            if (model.ContactDHCoordinator != null)
            {
                this.DHCoordinator = new EmployeeSearchViewModel(model.ContactDHCoordinator);
            }

            if (model.ContactMSC != null)
            {
                this.MSC = new EmployeeSearchViewModel(model.ContactMSC);
            }

            this.Parents = model.Parents;
            this.Others  = model.Others;
            this.Others2 = model.Others2;
            this.Others3 = model.Others3;

            this.IsIncludeIndividialToParticipant = model.IsIncludeIndividialToParticipant;
            this.IsAutoSignature  = model.IsAutoSignature;
            this.IsMSCParticipant = model.IsMSCParticipant;
            this.Notes            = model.Notes;

            this.DateCreated = model.DateCreated;
            this.DateUpdated = model.DateUpdated;

            this.AddedById = model.AddedById;
            if (model.SystemUserAddedBy != null)
            {
                this.AddedByName = model.SystemUserAddedBy.LastName + ", " + model.SystemUserAddedBy.FirstName;
            }

            this.UpdatedById   = model.UpdatedById;
            this.UpdatedByName = "";
            if (model.SystemUserUpdatedBy != null)
            {
                this.UpdatedByName = model.SystemUserUpdatedBy.LastName + ", " + model.SystemUserUpdatedBy.FirstName;
            }

            this.ConsumerHabReviewIssueStates = new ConsumerHabReviewIssueStatesModel(model.ConsumerHabReviewIssueStates.FirstOrDefault());
            this.DateReview    = model.DateReview;
            this.SignatureDate = model.SignatureDate;
        }
Beispiel #2
0
 public ConsumerHabReviewViewModel()
 {
     ConsumerHabReviewIssueStates = new ConsumerHabReviewIssueStatesModel();
 }