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

            if (cell == null)
            {
                cell = new adsTableViewCell(new NSString("tableviewcell"));
            }
            cell.UpdateCell(pm.title, pm.shortdesc, pm.image);
            return(cell);
        }
Example #2
0
        public async Task <advModel> GetAdvsById(int id)
        {
            advModel gn = (await firebase.Child("cities").Child("adv").OnceAsync <advModel>())
                          .Where(c => c.Object.id == id).Select(item => new advModel
            {
                id        = item.Object.id,
                title     = item.Object.title,
                image     = item.Object.image,
                shortdesc = item.Object.shortdesc,
                liqo      = item.Object.liqo
            }).FirstOrDefault();

            return(gn);
        }