Beispiel #1
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            var          cell = tableView.DequeueReusableCell(CellIdentifier) as invistsTableViewCell;
            InvestsModel pm   = TableItems[indexPath.Row];

            if (cell == null)
            {
                cell = new invistsTableViewCell(new NSString("tableviewcell"));
            }

            cell.UpdateCell(pm.title, pm.levelname, pm.shortdesc, pm.longdesc, pm.space, pm.image);
            return(cell);
        }
Beispiel #2
0
        public async Task <InvestsModel> GetNewsById(int id)
        {
            InvestsModel gn = (await firebase.Child("cities").Child("news").OnceAsync <InvestsModel>())
                              .Where(c => c.Object.id == id).Select(item => new InvestsModel
            {
                id        = item.Object.id,
                title     = item.Object.title,
                image     = item.Object.image,
                levelname = item.Object.levelname,
                shortdesc = item.Object.shortdesc,
                longdesc  = item.Object.longdesc,
                space     = item.Object.space
            }).FirstOrDefault();

            return(gn);
        }