protected void ConfigureCell(UITableViewCell cell, JsonPromos jsonPromos) { cell.TextLabel.Text = jsonPromos.titulo; string detailedStr = string.Format("{0:C} | {1}", jsonPromos.precio, jsonPromos.descuento); cell.DetailTextLabel.Text = detailedStr; }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { JsonPromos jsonPromos = FilteredProducts [indexPath.Row]; UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier); ConfigureCell(cell, jsonPromos); return(cell); }
public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { JsonPromos selectedProduct = (tableView == TableView) ? promos [indexPath.Row] : resultsTableController.FilteredProducts [indexPath.Row]; promos [indexPath.Row] = selectedProduct; NavigationController.PushViewController(new InfoView(promos [indexPath.Row]), true); tableView.DeselectRow(indexPath, true); }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { JsonPromos jsonPromos = promos [indexPath.Row]; UITableViewCell cell = TableView.DequeueReusableCell((NSString)cellIdentifier, indexPath); ConfigureCell(cell, jsonPromos); return(cell); }
public InfoView(JsonPromos jsonPromos) { this.jsonPromos = jsonPromos; string dbPath = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.Personal), "favorites.db3"); db = new SQLiteConnection(dbPath); db.CreateTable <Favorites> (); }
public DetailPromo(JsonPromos jsonPromos) { this.jsonPromos = jsonPromos; }