Пример #1
0
 /// <summary>
 /// Populate Concert from the View Model
 /// </summary>
 /// <param name="inVM"></param>
 public void fromViewModel(ConcertVM inVM)
 {
     this.concertID        = inVM.concertID;
     this.concertName      = inVM.concertName;
     this.ticketPrice      = inVM.ticketPrice;
     this.attendees        = inVM.attendees;
     this.bands            = inVM.bands;
     this.concertDayOfWeek = inVM.concertDayOfWeek;
     this.concertDate      = inVM.concertDate;
     this.venue            = inVM.venue;
     this.comment          = inVM.comment;
     this.auditInfo        = inVM.auditInfo;
 }
Пример #2
0
        /// <summary>
        /// To ViewModel method
        /// </summary>
        /// <returns></returns>
        public ConcertVM toViewModel()
        {
            ConcertVM vm = new ConcertVM();

            vm.concertID        = this.concertID;
            vm.concertName      = this.concertName;
            vm.ticketPrice      = this.ticketPrice;
            vm.attendees        = this.attendees;
            vm.bands            = this.bands;
            vm.concertDayOfWeek = this.concertDayOfWeek;
            vm.concertDate      = this.concertDate;
            vm.venue            = this.venue;
            vm.comment          = this.comment;
            vm.auditInfo        = this.auditInfo;

            return(vm);
        }