예제 #1
0
        private void LoadUserDatos()
        {
            var User = _DatosUser.GetDatosVendors ();

            if (User != null) {
                IsLoginVendors = true;
                TxtEntrar.Text = User.Name;
                TxtContact.Text = User.Contact;
                if (!string.IsNullOrEmpty (User.UrlImg)) {
                    using (var img = new DownloadAsync ()) {
                        img.DownloadHistory (ImgLogo, User.UrlImg);
                    }
                }
                LoadMenu (1);

            } else {
                IsLoginVendors = false;

                var Clients = _DatosUser.GetDatosClients ();

                if (Clients != null) {
                    IsLoginClients = true;
                    TxtEntrar.Text = Clients.Name;
                    TxtContact.Text = Clients.Email;

                    if (!string.IsNullOrEmpty (Clients.UrlImg)) {
                        using (var img = new DownloadAsync ()) {
                            img.DownloadHistory (ImgLogo, Clients.UrlImg);
                        }
                    }

                    LoadMenu (0);
                }
            }
        }
예제 #2
0
        private void LoadDatos()
        {
            var r = new Random ();

            var nproveedores = r.Next (100, 623).ToString ();

            var msg = "En TIEMPO REAL a mas de " + nproveedores + " Provedores que TE enviaran las Mejores OFERTAS de este producto, Solo espera Unos MINUTOS";

            _ProgressDialog = ProgressDialog.Show (this.Activity, "Estamos Contactando", msg, true);
            _ProgressDialog.Show ();

            var DatosClient = _DatosUser.GetDatosClients ();

            var DatosProduct = _DatosUser.GetDatosProduct ();

            if(DatosClient!=null){

                using (var _Bussines = new Bussines ()) {

                     _Bussines.SetConsultProduct (DatosClient.Id, DatosProduct.Id);

                }

            }

            List<Ofertas> List = new List<Ofertas> () {

                new Ofertas {

                    Id = "",
                    Trade = "TOTAL CELL",
                    UrlImg = "http://www.tiendasjumbo.co/arquivos/logo-jumbo.png",
                    Contact = "JHON HAROLD DIAZ",
                    City = "VALLEDUPAR",
                    IsSend = true,
                    IsWarranty = true,
                    Price = 10500

                },
                new Ofertas {

                    Id = "",
                    Trade = "TOTAL CELL",
                    UrlImg = "http://production-alkosto-data.s3-website-us-east-1.amazonaws.com/media/ALKOSTO/contenido/logo-octubre-header.png",
                    Contact = "JHON HAROLD DIAZ",
                    City = "BOGOTA",
                    IsSend = true,
                    IsWarranty = true,
                    Price = 105600

                }
                ,
                new Ofertas {

                    Id = "",
                    Trade = "TOTAL CELL",
                    UrlImg = "http://www.tiendasjumbo.co/arquivos/logo-jumbo.png",
                    Contact = "JHON HAROLD DIAZ",
                    City = "BOGOTA",
                    IsSend = true,
                    IsWarranty = true,
                    Price = 1056000

                }

                ,
                new Ofertas {

                    Id = "",
                    Trade = "TOTAL CELL",
                    UrlImg = "http://production-alkosto-data.s3-website-us-east-1.amazonaws.com/media/ALKOSTO/contenido/logo-octubre-header.png",
                    Contact = "JHON HAROLD DIAZ",
                    City = "BOGOTA",
                    IsSend = true,
                    IsWarranty = true,
                    Price = 105

                }

            };

            var Orderlist = List.OrderBy (d => d.Price).ToList();

            //			var FirtPreci = Orderlist.FirstOrDefault ();
            //
            //			if (FirtPreci != null) {
            //				TxtTrade.Text = FirtPreci.Trade;
            //				TxtPrecio.Text = string.Format ("${0:N}", FirtPreci.Price);
            //			}

            ListVOfertas.Adapter = new ListOfertaAdapter (this.Activity, Orderlist);

            _ProgressDialog.Dismiss ();

            if (!string.IsNullOrEmpty (Product.UrlImg)) {

                var img = new DownloadAsync ();
                img.DownloadHistory (ImgPro,Product.UrlImg);

            }
        }
예제 #3
0
        public override void OnViewCreated(View view, Bundle savedInstanceState)
        {
            Product = _DatosUser.GetDatosProduct ();

            var ImgPro = view.FindViewById<ImageView> (Resource.Id.ImgPro);
            var TxtProduct = view.FindViewById<TextView> (Resource.Id.TxtProduct);
            var TxtSale = view.FindViewById<TextView> (Resource.Id.TxtSale);
            var TxtLike = view.FindViewById<TextView> (Resource.Id.TxtLike);

            TxtProduct.Text = Product.Name;
            TxtSale.Text = Product.Sales.ToString();
            TxtLike.Text = Product.LikeValue.ToString();

            var TxtCelular = view.FindViewById<TextView> (Resource.Id.TxtCelular);

            var BtnCall = view.FindViewById<Button> (Resource.Id.BtnCall);

            var BtnNavegar = view.FindViewById<Button> (Resource.Id.BtnNavegar);

            TxtCelular.Click += (sender, e) => {
                Intent intent = new Intent (Intent.ActionCall, Android.Net.Uri.Parse ("tel:962849347"));
                this.Activity.StartActivity (intent);

            };

            BtnCall.Click += (sender, e) => {

                Intent intent = new Intent (Intent.ActionCall, Android.Net.Uri.Parse ("tel:962849347"));
                this.Activity.StartActivity (intent);

            };

            BtnNavegar.Click += (sender, e) => {

                var geo = string.Format ("google.navigation:q={0},{1}", "4.614102669338081", "-74.12763388903807");

                Intent intent = new Intent (Intent.ActionView, Android.Net.Uri.Parse (geo));
                this.Activity.StartActivity (intent);

            //				Intent i = new Intent(Intent.ActionView,Android.Net.Uri.Parse("geo:37.827500,-122.481670"));
            //				i.SetClassName("com.google.android.apps.maps","com.google.android.maps.MapsActivity");
            //				this.Activity.StartActivity(i);

            };

            if (!string.IsNullOrEmpty (Product.UrlImg)) {

                var img = new DownloadAsync ();
                img.DownloadHistory (ImgPro,Product.UrlImg);

            }

            base.OnViewCreated (view, savedInstanceState);
        }