public InterventionDayViewModel(InterventionDays model)
 {
     this.Id                   = model.Id;
     this.School               = new SchoolViewModel(model.School);
     this.DtIntervention       = model.DtIntervention;
     this.SampleSize           = model.SampleSize;
     this.InterventionFinished = model.InterventionFinished;
     this.Active               = model.Active;
     this.DtCreated            = model.DtCreated;
     this.CreatedBy            = model.CreatedBy;
     this.DtModified           = model.DtModified;
     this.ModifiedBy           = model.ModifiedBy;
 }
        public InterventionDays ConvertToInterventionDays()
        {
            var interventionDay = new InterventionDays
            {
                Id                   = this.Id,
                School               = this.School.ConvertToSchools(),
                DtIntervention       = this.DtIntervention,
                SampleSize           = this.SampleSize,
                InterventionFinished = this.InterventionFinished,
                Active               = this.Active,
                DtCreated            = this.DtCreated,
                CreatedBy            = this.CreatedBy,
                DtModified           = this.DtModified,
                ModifiedBy           = this.ModifiedBy
            };

            return(interventionDay);
        }
Esempio n. 3
0
 public TestViewModel(InterventionDays interventionDays)
 {
     SchoolName        = interventionDays.School.Name;
     DataColletionDate = interventionDays.DtIntervention;
     SchoolType        = interventionDays.School.SchoolType.Type;
 }
 public DataEntryMeasurementDayViewModel(InterventionDays interventionDay, DataEntryLocks dataEntryLock, ResearchTeamMembers lockedUser)
 {
     this.InterventionDay = interventionDay;
     this.DataEntryLock   = dataEntryLock;
     this.LockedUser      = lockedUser;
 }
 public AllDataCollectionViewModel(InterventionDays interventionDays)
 {
     SchoolName        = interventionDays.School.Name;
     DataColletionDate = interventionDays.DtIntervention;
 }