Ejemplo n.º 1
0
        public void DownloadRawData()
        {
            var url = Session["url"] as string;

            //need to store the url in session as well
            RemoteFile request = new RemoteFile();

            StreamReader rawData = request.GetCSV(url);

            DownloadFile rawDataString = new DownloadFile();

            HttpResponseBase response = HttpContext.Response;

            rawDataString.downloadRawData(rawData.ReadToEnd(), response);
        }
Ejemplo n.º 2
0
        public ActionResult viewData(string url)
        {
            if (url == null)
            {
                url = Session["url"] as string;
            }

            //DataTable stored in session
            Session.Add("url", url);

            RemoteFile   URL = new RemoteFile();
            StreamReader sr  = URL.GetCSV(url);
            DataTable    dt  = URL.parseFile(sr);

            DataTable Model = dt;

            //Store DataTable in session
            Session.Add("dt", Model);
            Session.Add("FullDT", Model);

            return(View("ViewData"));
        }