예제 #1
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            TripViewCell cell = tableView.DequeueReusableCell(cellIdentifier) as TripViewCell;

            if (cell == null)
            {
                cell = new TripViewCell(cellIdentifier);
            }
            if (trips != null && trips.Count > 0)
            {
                var trip = trips[indexPath.Row];
                cell.UpdateCell(trip.Title, string.Format("from {0} to {1}",
                                                          trip.StartDate.ToString("D"),
                                                          trip.EndDate.ToString("D")),
                                trip.TotalAmount.ToString("C"));
            }
            return(cell);
        }
예제 #2
0
		public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
		{

			TripViewCell cell = tableView.DequeueReusableCell (cellIdentifier) as TripViewCell;
			if (cell == null)
				cell = new TripViewCell (cellIdentifier);
			if(trips!=null && trips.Count > 0)
			{
				var trip = trips[indexPath.Row];
				cell.UpdateCell (trip.Title, string.Format("from {0} to {1}", 
				                                           trip.StartDate.ToString("D"), 
				                                           trip.EndDate.ToString("D")), 
				                 trip.TotalAmount.ToString("C"));
			}
			return cell;
		}