Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ViewState["TCount"] = TCount;
- FILE NOTEClient/Ref:Surname/Date:15 July 2016Matter:Attended by:LCTime engaged:1 hour – .Time engaged – 1 hour
- string count = Regex.Replace(CKEditor1.Text, @"<[^>]+>| |"|'| |n|r|t|–|Start here|text here", "");
- FILE NOTEClient/Ref:Surname/Date:15 July 2016Matter:Attended by:LCTime engaged:1 hour .Time engaged 1 hour
- FILE NOTEClient/Ref:Surname/Date:15 July 2016Matter:Attended by:LCTime engaged:1 hour – .Time engaged – 1 hour
- FILE NOTEClient/Ref:Surname/Date:15 July 2016Matter:Attended by:LCTime engaged:1 hour .Time engaged 1 hour
- protected void ShowTemplate(byte[] Template)
- {
- CKEditor1.Text = "";
- byte[] excelContents = Template;
- File.WriteAllBytes(Server.MapPath("~/Doc/") + "Demo.Docx", excelContents);
- string[] splits = Request.Url.AbsoluteUri.Split('/');
- string url = string.Empty;
- if (splits.Length >= 2)
- {
- url = splits[0] + "//";
- for (int i = 2; i < splits.Length - 1; i++)
- {
- url += splits[i];
- url += "/";
- }
- }
- string ImgPath = url + "Doc\Demo_images";
- html = html.Replace("Demo_images", ImgPath);
- string STR = html;
- string STRFirst = "<title>";
- string STRLast = "</title>";
- string FinalString;
- int Pos1 = STR.IndexOf(STRFirst) + STRFirst.Length;
- int Pos2 = STR.IndexOf(STRLast);
- FinalString = STR.Substring(Pos1, Pos2 - Pos1);
- if (FinalString.Length > 0)
- { html = html.Replace(FinalString, ""); }
- string str = @"""0""";
- string str1 = "<table border=" + str + " ";
- html = html.Replace("<table", str1);
- html = html.Replace("border-top-color:", ""><hr /><border-top-color:");
- CKEditor1.Text = html;
- String TCount = Regex.Replace(CKEditor1.Text, @"<[^>]+>| |"|'| |n|r|t|–|Start here|text here", "");
- ViewState["TCount"] = TCount;
- }
- protected void btnCompleteTranscription_Click(object sender, EventArgs e)
- {
- string count = Regex.Replace(CKEditor1.Text, @"<[^>]+>| |"|'| |n|r|t|–|Start here|text here", "");
- string Text = "<html><body>" + CKEditor1.Text + "</body></html>";
- Text = Text.Replace("<", "<");
- Text = Text.Replace(">", ">");
- Text = Text.Replace(">style=", "><span style=");
- Text = Text.Replace("<span <", "<span></span> <");
- Text = Text.Replace("<p <", "<p> <");
- Text = Text.Replace("<del", "<s><span");
- Text = Text.Replace("</del", "</s></span");
- Text = Text.Replace(" ", " ");
- Text = Text.Replace("<s style=", "<s><span style=");
- Text = Text.Replace("<p <", "<p style="text-align:justify"><span><");
- Text = Text.Replace(">font-size:14pt", " "); ;
- CKEditor1.Text = Text;
- string TCount = ViewState["TCount"].ToString();
- int TLength=(Int32)ViewState["TCount"].ToString().Length;
- int WCount = (Int32)count.Length - TLength;
- string datefolder = DateTime.Today.Month.ToString().Length < 2 ? "0" + DateTime.Today.Month.ToString() : DateTime.Today.Month.ToString();
- datefolder += DateTime.Today.Day.ToString().Length < 2 ? "0" + DateTime.Today.Day.ToString() : DateTime.Today.Day.ToString();
- datefolder += DateTime.Today.Year.ToString();
- string ComparePath = Server.MapPath("~/GDocs/" + Session["uid"].ToString().ToUpper() + "/Transcribed/" + datefolder);
- if (!System.IO.Directory.Exists(ComparePath))
- {
- System.IO.Directory.CreateDirectory(ComparePath);
- }
- using (System.IO.StreamWriter file = new System.IO.StreamWriter(ComparePath + @"" + ViewState["af"].ToString().Replace(".wav", "") + ".Doc"))
- {
- file.Write(Text);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement