sending back the data to the user who had done that without modifying or affecting the database
In my application if user selects a radio button named RE-WORK and click on submit button i need to send the row of the the gridview back to the user who had done that work that means his head is assigning the work back to the person who had did it.My requirement is how to send that back from head to the same user who had did that work.if (rbQCReWork.Checked)
{
string status1 = "10";
string id1 = ViewState["id"].ToString();
if (status1 == "10" && id1 == ViewState["id"].ToString())
{
string sendtext = CKEditor1.Text;
string filename = ViewState["Filename"].ToString();
string path1 = ViewState["FullPath"].ToString();
path1 = "GT" + path1.Replace(@"C:\Eliscription\ToEliscription", "").Replace(@"\", "/");
string newpath = path1.ToString();
newpath = newpath.Substring(newpath.IndexOf('/') + 1);
string Firmname = newpath.Substring(0, newpath.IndexOf("/"));
string newpath2 = newpath.ToString();
newpath2 = newpath2.Substring(0, newpath2.LastIndexOf("/") + 1);
newpath2 = newpath2.Substring(newpath2.IndexOf("/"));
string Solicitor = newpath2.Replace("/", "");
string Date = ViewState["Date"].ToString();
id1 = ViewState["id"].ToString();
string audiopath = ViewState["audiopath"].ToString();
string transcribername = ViewState["Name"].ToString();
}
}
When status=10 only it should enter in the code and from the above code i am able to get id1(who has done that file),sendtext(ck editor text),filename (filename i could get),Firmname (i am getting the firm name),Solicitor (i am getting the solicitor name),Date (i am getting the date),audiopath(i am able to get audio path),transcribername (name of the person who had did that),from the above if i am getting all these out of the i need to send FIRMNAME,SOLICITOR,RECEIVED DATE,FILESIZE AND FILENAME back to the same user who had did it and when that user gets logged in with his credentials he should be able to view the FIRMNAME,SOLICITOR,RECEIVED DATE,FILESIZE AND FILENAME in gridview how can i send it from head to the user (the condition is it should not get inserted in database just it should get updated backe to the user) how can i do this can anyone help me out
c# in the user's page
protected void btnCompleteTranscription_Click(object sender, EventArgs e)
{
string Status = "2";
if (rbClientQC.Checked)
Status = "5";
string text = CKEditor1.Text;
text = Regex.Replace(text, @"<[^>]+>| | ", "");
text = Regex.Replace(text, @"\s+", " ");
text = text.Replace("–", "–");
text = text.Replace("’", "'");
int lineCount = text.Length - Int32.Parse(ViewState["tccount"].ToString());
float flinecount = lineCount / 65f;
decimal lc = (decimal)flinecount;
adm.MTGSaveTranscriptionWork(ViewState["id"].ToString(), CKEditor1.Text, Session["uid"].ToString(), Status, string.Format("{0:0.00}", lc.ToString()), ViewState["tccount"].ToString());
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><");
CKEditor1.Text = Text;
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);
}
Response.Redirect("MTGReadyToWork.aspx");
}
And corresponding query
public void MTGSaveTranscriptionWork(string WorkID, string TData, string Transcriber, string Status, string LOC, string TemplateLOC)
{
dbutil.ExecProc("dbo.UP_MTGAddTranscriptionData", "@WorkID", WorkID, "@TranscribedData", TData, "@CreatedBy", Transcriber, "@Status", Status, "@LOC", LOC, "@TemplateLineCount", TemplateLOC);
}
c# code in head page:-
protected void btnCompleteTranscription_Click(object sender, EventArgs e)
{
ViewState["pd"] = CKEditor1.Text;
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><");
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 QCPath = Server.MapPath("~/GDocs/" + Session["uid"].ToString().ToUpper() + "/QC/" + datefolder);
if (!System.IO.Directory.Exists(QCPath))
{
System.IO.Directory.CreateDirectory(QCPath);
}
using (System.IO.StreamWriter file = new System.IO.StreamWriter(QCPath + @"\" + ViewState["af"].ToString().Replace(".wav", "") + ".Doc"))
{
file.Write(Text);
}
string text = CKEditor1.Text;
text = Regex.Replace(text, @"<[^>]+>| | ", "");
text = Regex.Replace(text, @"\s+", " ");
text = text.Replace("–", "–");
text = text.Replace("’", "'");
string status = "8";
if (rbQCNotDone.Checked)
status = "9";
adm.MTGSaveClientQCWork(ViewState["id"].ToString(), CKEditor1.Text, Session["uid"].ToString(), "", status);
Response.Redirect("MTGReadyToClientQCWorks.aspx");
}
And the corresponding query
public void MTGSaveClientQCWork(string WorkID, string QCData, string ClientQCBy, string QCLC, string Status)
{
dbutil.ExecProc("dbo.UP_MTGAddClientQCData", "@WorkID", WorkID, "@ClientQCData", QCData, "@QCBy", ClientQCBy, "@QCLC", QCLC, "@status", Status);
}
***currently the functinality is when head is clicking the btn complete the data is getting saved in database using MTGSaveClientQCWork query,but the requirement is not to store in database but send back to the user who had done that work without modifying or affecting the database***
how can i do this