2
Answers

how to send the mail all information

ajay kumar

ajay kumar

9y
494
1
protected void bt_submit_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(Request.QueryString["Pageid"]))
{
if (Session["Id"] != null)
{

string str1 = "insert into tbl_conversation([cust_ID],[rep_ID],[conversation_description],[conversation_datetime],[conversation_type],[callback_datetime],[conversation_status],Role) values('" + ddlcustomer.SelectedItem.Value + "','" + Convert.ToInt64(Session["Id"]) + "','" + txtdescriton.Text + "','" + DateTime.Parse(Request.Form[txtconversation_datetime.UniqueID]) + "','" + ddlconversationtype.SelectedItem.Value + "','" + txtcallback.Text + "','1','Admin')";




c1.exexuteQry(str1);




}
else
{
if (Session["RecId"] != null)
{
string str1 = "insert into tbl_conversation([cust_ID],[rep_ID],[conversation_description],[conversation_datetime],[conversation_type],[callback_datetime],[conversation_status],Role) values('" + ddlcustomer.SelectedItem.Value + "','" + Convert.ToInt64(Session["RecId"]) + "','" + txtdescriton.Text + "','" + DateTime.Parse(Request.Form[txtconversation_datetime.UniqueID]) + "','" + ddlconversationtype.SelectedItem.Value + "','" + DateTime.Parse(Request.Form[txtcallback.UniqueID]) + "','1','User')";
c1.exexuteQry(str1);
}
}



Response.Write(@"<script langauge='text/javascript'>alert('...Insert successfull...');</script>");
}
else
{
if (Session["Id"] != null)
{
string str = "update tbl_conversation SET [cust_ID] ='" + ddlcustomer.SelectedItem.Value + "' ,[rep_ID] ='" + Convert.ToInt64(Session["Id"]) + "' ,[conversation_description] ='" + txtdescriton.Text + "' ,[conversation_datetime] ='" + DateTime.Parse(Request.Form[txtconversation_datetime.UniqueID]) + "' ,[conversation_type] = '" + ddlconversationtype.SelectedItem.Value + "',[callback_datetime] ='" + DateTime.Parse(Request.Form[txtcallback.UniqueID]) + "',Role='Admin' where conversation_ID='" + Convert.ToInt64(Request.QueryString["Pageid"]) + "' ";
c1.exexuteQry(str);
}
else
{
if (Session["RecId"] != null)
{
string str = "update tbl_conversation SET [cust_ID] ='" + ddlcustomer.SelectedItem.Value + "' ,[rep_ID] ='" + Convert.ToInt64(Session["RecId"]) + "' ,[conversation_description] ='" + txtdescriton.Text + "' ,[conversation_datetime] ='" + DateTime.Parse(Request.Form[txtconversation_datetime.UniqueID]) + "' ,[conversation_type] = '" + ddlconversationtype.SelectedItem.Value + "',[callback_datetime] ='" + DateTime.Parse(Request.Form[txtcallback.UniqueID]) + "',Role='User' where conversation_ID='" + Convert.ToInt64(Request.QueryString["Pageid"]) + "' ";
c1.exexuteQry(str);
}
}
Response.Write(@"<script langauge='text/javascript'>alert('...Update successfull...');</script>");
Response.Redirect("Cust_Conversation.aspx");

}

fillgrid();
clear();

}
Answers (2)