Пример #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;
		}