Exemplo n.º 1
0
        public JsonResult ImagesPlaces(int?id)
        {
            List <ImagePlaces> lista = new List <ImagePlaces>();

            List <string> listImage = new List <string>();

            Task <List <string> > task = CDropBox.ListFolderTree(listImage, id.GetValueOrDefault());

            task.Wait();


            foreach (string value in listImage)
            {
                ImagePlaces image = new ImagePlaces();

                //image.id = Convert.ToInt32(rw[0].ToString());
                image.url = value;
                //image.id_Place = Convert.ToInt32(rw[2].ToString());

                lista.Add(image);
            }


            return(Json(lista,
                        JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        private string getUrlImage(int id)
        {
            string        value = "";
            Task <string> task  = CDropBox.ImageLogo(value, id);

            task.Wait();
            value = task.Result;

            return(value);
        }
Exemplo n.º 3
0
        // This method gets called by the runtime. Use this method to add services to the container.
        // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddTransient <IAuthorsInteractor, CAuthorsInteractor>();
            services.AddTransient <IBooksInteractor, CBooksInteractor>();
            services.AddTransient <ICategoriesInteractor, CCategoriesInteractor>();

            CDropBox appData = CDropBox.getInstance();

            services.AddSingleton <IRemoteStorage>(appData);

            services.AddMvc();
            services.AddControllersWithViews(mvcOtions =>
            {
                mvcOtions.EnableEndpointRouting = false;
            });
        }