Ejemplo n.º 1
0
        public void PopulateVM(Franchise entityModel)
        {
            if (entityModel == null)
            {
                return;
            }

            this.Id = entityModel.Id;
            this.MasterFranchiseCode = entityModel.MasterFranchiseCode;
            this.Name                 = entityModel.Name;
            this.TradingName          = entityModel.TradingName;
            this.EmailAddress         = entityModel.EmailAddress;
            this.BusinessPhoneNumber  = entityModel.BusinessPhoneNumber;
            this.OtherNumber          = entityModel.OtherNumber;
            this.MobileNumber         = entityModel.MobileNumber;
            this.CodeOfConductURL     = entityModel.CodeOfConductURL;
            this.MetroRegion          = entityModel.MetroRegion;
            this.PhysicalAddressRefId = entityModel.PhysicalAddressRefId;
            this.IsActive             = entityModel.IsActive;

            if (entityModel.PhysicalAddress != null)
            {
                UpdateAddressViewModel _vm = new UpdateAddressViewModel();
                _vm.PopulateVM(entityModel.PhysicalAddress);
                this.PhysicalAddress = _vm;
            }
            this.PhysicalAddressRefId = entityModel.PhysicalAddressRefId;

            FormatContactNumbers(entityModel);
        }
Ejemplo n.º 2
0
        protected void FormatContactDetails(Address physicalAddress)
        {
            if (physicalAddress != null)
            {
                UpdateAddressViewModel _vm = new UpdateAddressViewModel();
                _vm.PopulateVM(physicalAddress);
                this.PhysicalAddress      = _vm;
                this.PhysicalAddressRefId = physicalAddress.Id;
            }

            FormatContactNumbers();
        }