public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { try{ pdView = new ProductDetailView(); Double distancia = location.Location.DistanceFrom(new CLLocation(Double.Parse(tableItems[indexPath.Section].tienda_latitud), Double.Parse(tableItems[indexPath.Section].tienda_longitud))) / 1000; pdView.setProductAndDistance(tableItems [indexPath.Row], distancia); controller.NavigationController.PushViewController(pdView, true); }catch (NullReferenceException) { pdView = new ProductDetailView(); pdView.setProductAndDistance(tableItems [indexPath.Row], 0); controller.NavigationController.PushViewController(pdView, true); } }
public AddToListsTableSource(List <ListsService> items, ProductDetailView controller, ProductSearchDetailService producto, int cantidad) { tableItems = items; this.producto = producto; this.cantidad = cantidad; }
public AddToListsTableSource (List<ListsService> items, ProductDetailView controller, ProductSearchDetailService producto, int cantidad) { tableItems = items; this.producto = producto; this.cantidad = cantidad; }
public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { try{ pdView = new ProductDetailView (); Double distancia = location.Location.DistanceFrom (new CLLocation(Double.Parse(tableItems[indexPath.Section].tienda_latitud),Double.Parse(tableItems[indexPath.Section].tienda_longitud)))/1000; pdView.setProductAndDistance(tableItems [indexPath.Row],distancia); controller.NavigationController.PushViewController (pdView, true); }catch(NullReferenceException){ pdView = new ProductDetailView (); pdView.setProductAndDistance(tableItems [indexPath.Row],0); controller.NavigationController.PushViewController (pdView, true); } }