public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { AppointmentCell cell = (AppointmentCell)tableView.DequeueReusableCell(CELL_ID, indexPath); if (Appointments != null) { D365Appointment appointment = Appointments[indexPath.Row]; cell.Update(appointment); } return(cell); }
public void Update(D365Appointment Appointment) { TitleLabel.Text = Appointment.Branch.Name; AddressLabel.Text = $"{Appointment.Branch.Street1} {Appointment.Branch.City}"; DateLabel.Text = $"{Appointment.StartDate:MMMM d}"; TimeLabel.Text = $"{Appointment.StartDate.ToLocalTime():h:mm} - {Appointment.EndDate.ToLocalTime():h:mm tt}"; ReasonLabel.Text = Appointment.AppointmentReason; StatusLabel.Text = Appointment.Status; //image IconImage.Image = UIImage.FromBundle("WoodIcon"); AdvisorLabel.Text = Appointment.Advisor.FullName; NumberLabel.Text = Appointment.ConfirmationNumber; }