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;
        }
Beispiel #2
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            JsonPromos      jsonPromos = FilteredProducts [indexPath.Row];
            UITableViewCell cell       = tableView.DequeueReusableCell(cellIdentifier);

            ConfigureCell(cell, jsonPromos);
            return(cell);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        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> ();
        }
Beispiel #6
0
 public DetailPromo(JsonPromos jsonPromos)
 {
     this.jsonPromos = jsonPromos;
 }