private void Listapendientes_ItemClick(object sender, AdapterView.ItemClickEventArgs e)
        {
            var RentalId = list[e.Position].RentaId;

            List <RentalDetailsWS> Detailsrenta = Service.RentalDetailList(RentalId);

            //SE INFLA LA VISTA CON EL LAYOUT DETALLE DE LIBRO
            View view = LayoutInflater.Inflate(Resource.Layout.framentdetailspendinglist, null);

            //SE CREA EL POP UP DEL LIBRO
            Android.App.AlertDialog builder = new Android.App.AlertDialog.Builder((Activity)rootView.Context)
                                              .SetTitle("Detalles del Prestamo")
                                              .SetIcon(Android.Resource.Drawable.IcDialogInfo).Create();

            //ASIGNACION DE TEXTOS :v
            detallepending = view.FindViewById <ListView>(Resource.Id.listView1);

            detallepending.Adapter = new AdapterPendingDetails((Activity)rootView.Context, Detailsrenta);

            builder.SetView(view);
            builder.Show();
        }
Example #2
0
        private void Lista_ItemClick(object sender, AdapterView.ItemClickEventArgs e)
        {
            var RentalId = alquiler[e.Position].RentaId;

            List <RentalDetailsWS> Detailsrenta = Service.RentalDetailList(RentalId);

            //SE INFLA LA VISTA CON EL LAYOUT DETALLE DE LIBRO
            View view = LayoutInflater.Inflate(Resource.Layout.framentdetailspendinglist, null);

            //SE CREA EL POP UP DEL LIBRO
            AlertDialog builder = new AlertDialog.Builder((Activity)rootView.Context)
                                  .SetTitle("Detalles del Prestamo")
                                  .SetIcon(Android.Resource.Drawable.IcDialogInfo)
                                  .SetNegativeButton("Cerrar", (IDialogInterfaceOnClickListener)null)
                                  .SetPositiveButton("Devolver", delegate
            {
                var cualquiernombre = Service.RentalReturns(alquiler[e.Position].CodigoAlquiler);

                if (cualquiernombre.band)
                {
                    Toast.MakeText(rootView.Context, cualquiernombre.message, ToastLength.Long).Show();
                }
                else
                {
                    Toast.MakeText(rootView.Context, cualquiernombre.message, ToastLength.Long).Show();
                }
            }).Create();

            //ASIGNACION DE TEXTOS :v
            detalle = view.FindViewById <ListView>(Resource.Id.listView1);

            detalle.Adapter = new AdapterPendingDetails((Activity)rootView.Context, Detailsrenta);

            builder.SetView(view);
            builder.Show();
        }