Exemplo n.º 1
0
            public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
            {
                UITableViewCell cell;

                int row = indexPath.Row;

                if (row == _vc.Customers.Count)
                {
                    cell = new UITableViewCell();
                    cell.TextLabel.Text = "Add Customer";
                }
                else
                {
                    Customer aCustomer = _vc.Customers[row];
                    cell = tableView.DequeueReusableCell(CUSTOMER_CELL);
                    if (cell == null)
                    {
                        cell = new CustomerCell(aCustomer, CUSTOMER_CELL);
                    }
                    else
                    {
                        (cell as CustomerCell).Customer = aCustomer;
                    }
                }

                return(cell);
            }
 public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
 {
     UITableViewCell cell;
     
     int row = indexPath.Row;
     
     if (row == _vc.Customers.Count) {
         cell = new UITableViewCell ();
         cell.TextLabel.Text = "Add Customer";
     } else {              
         Customer aCustomer = _vc.Customers[row];
         cell = tableView.DequeueReusableCell (CUSTOMER_CELL);
         if (cell == null)     
             cell = new CustomerCell(aCustomer, CUSTOMER_CELL);
         else
             (cell as CustomerCell).Customer = aCustomer;
     }
     
     return cell;
 }