Exemplo n.º 1
0
        public ActionResult AnalyzeFile()
        {
            IEWSList iList = new BsEWSList();

            if (Request.Files.Count > 0)
            {
                HttpFileCollectionBase files = Request.Files;

                string filename = Path.GetFileName(Request.Files[0].FileName);

                HttpPostedFileBase file = files[0];
                string             fname;
                if (Request.Browser.Browser.ToUpper() == "IE" || Request.Browser.Browser.ToUpper() == "INTERNETEXPLORER")
                {
                    string[] testfiles = file.FileName.Split(new char[] { '\\' });
                    fname = testfiles[testfiles.Length - 1];
                }
                else
                {
                    fname = file.FileName;
                }

                List <EWSWord> listOfWord = new List <EWSWord>();
                if ((file != null) && (file.ContentLength > 0) && !string.IsNullOrEmpty(file.FileName))
                {
                    StreamReader reader = new StreamReader(file.InputStream);

                    string m = reader.ReadToEnd();

                    iList.SaveReadPart(filename, GetCurrentUser().ID, m, null);
                }//if end
            }

            return(Script("Message('Dosya Analizi Tamamlandı','success');"));
        }
        public ActionResult NewReadingPart(string name, string body, string html)
        {
            IEWSList iList = new BsEWSList();

            iList.SaveReadPart(name, GetCurrentUser().ID, body, html);

            return(Script("Message('Okuma Parçası Kayıt Edildi.','success');"));
        }