Пример #1
0
 public override void ViewWillAppear(bool animated)
 {
     base.ViewWillAppear(animated);
     productos = DataPersistanceClass.products;
     CheckOutCollectionView.ReloadData();
     setDatos();
 }
        void ReleaseDesignerOutlets()
        {
            if (CheckOutCollectionView != null)
            {
                CheckOutCollectionView.Dispose();
                CheckOutCollectionView = null;
            }

            if (txtCantidad != null)
            {
                txtCantidad.Dispose();
                txtCantidad = null;
            }

            if (txtFormPago != null)
            {
                txtFormPago.Dispose();
                txtFormPago = null;
            }

            if (txtNombre != null)
            {
                txtNombre.Dispose();
                txtNombre = null;
            }

            if (txtTotal != null)
            {
                txtTotal.Dispose();
                txtTotal = null;
            }
        }
Пример #3
0
        public UICollectionViewCell GetCell(UICollectionView collectionView, NSIndexPath indexPath)
        {
            Producto producto = productos[int.Parse(indexPath.Item.ToString())];
            var      cell     = CheckOutCollectionView.DequeueReusableCell(CollectionCheckOutCell.Key, indexPath) as CollectionCheckOutCell;

            cell.txtCantidad = producto.ItemsBought;
            cell.lblNombre   = producto.Name;

            double number = int.Parse(cell.txtCantidad) * double.Parse(producto.Price.ToString());

            cell.lblTotalPrice = $"${number.ToString()}";
            getImagen(producto.Id, cell.imgnView);
            cell.viewController = this;
            cell.collectionView = collectionView;

            return(cell);
        }