Ejemplo n.º 1
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);
    }