Beispiel #1
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            var cell = (PersonCell)tableView.DequeueReusableCell((NSString)this.NameListCellId);

            if (cell == null)
            {
                cell = new PersonCell(this.NameListCellId);
            }

            cell.UpdateCell(this._personList[indexPath.Row]);
            return(cell);
        }
Beispiel #2
0
    public List <PersonCell> GetPersonTable()
    {
        DataRowCollection collect = ExcelAccess.GetCollection("Person.xls");
        List <PersonCell> list    = new List <PersonCell>();

        for (int i = 1; i < collect.Count; i++)
        {
            if (collect[i][1].ToString() == "")
            {
                continue;
            }

            PersonCell cell = new PersonCell();
            cell._id          = int.Parse(collect[i][0].ToString());
            cell._name        = collect[i][1].ToString();
            cell._description = collect[i][2].ToString();
            cell._gold        = int.Parse(collect[i][3].ToString());
            list.Add(cell);
        }
        return(list);
    }