Beispiel #1
0
        public async Task <HouseDetailsViewModel> GetHouseEditDetails(int id)
        {
            var service = DependencyService.Get <IUserOverview>();
            var result  = await service.GetHouseEditDetails(id);

            var hdvm = new HouseDetailsViewModel
            {
                ID = Convert.ToString(result.House.Id),
                IsEmailNotification         = result.House.EmailNotification,
                IsSMSNotification           = result.House.SMSNotification,
                IsNotifyTenant              = result.House.NotifyTenant,
                IsAutoSettleDuesfromAdvance = result.House.SettleFromAdvance,
                AreaInSqft                = result.House.Area,
                NumberofAdults            = Convert.ToString(result.House.NumberOfAdults),
                NumberofChildren          = Convert.ToString(result.House.NumberOfChildren),
                IntercomNumber            = Convert.ToString(result.House.Intercom),
                LocalBodyHouseNumber      = result.House.LocalBodyHouseNumber,
                ElectricityConsumerNumber = result.House.ElectricityConsumerNumber,
                SaleDeedNumber            = result.House.SaleDeedNumber,
                VehicleNumber             = result.House.VehicleNumber,
                VehicleMake               = result.House.VehicleMake,
                Comments = result.House.Comments,
                Resident = result.House.Resident
            };

            return(hdvm);
        }
        public ActionResult Details(int id)
        {
            var house = HousesManager.GetByID(id);

            if (house == null)
            {
                return(RedirectToAction("Index"));
            }

            var viewModel = new HouseDetailsViewModel(house);

            return(View(viewModel));
        }
 public HouseDetailsView(HouseDetailsViewModel viewModel = null)
 {
     InitializeComponent();
     BindingContext = viewModel;
 }