protected void send_feedBack(object sender, EventArgs e) { Next_ID nid = new Next_ID(); suggestionBAL sBal = new suggestionBAL(); suggestionBO sBO = new suggestionBO(); try { sBO.user_name = sugName.Value; sBO.suggestion_id = nid.incrementer("suggestion_id", "suggestion"); sBO.suggestion_msg = comments.Value; sBO.date_time = Convert.ToDateTime(DateTime.Now.ToString()); sBO.userEmail = txtemail.Value; if (sBal.suggestion_DAL_insert(sBO) > 0) { Response.Write("<script>alert('Thansk for your valuable feedback ');</script>"); sugName.Value = ""; comments.Value = ""; txtemail.Value = ""; } } catch (Exception) { Response.Write("<script>alert('Sorry for inconvenience ');</script>"); } }
//SENDING MAIL to admin protected void suggestion_btn_click(object sender, EventArgs e) { Next_ID nid = new Next_ID(); suggestionBO s_bo = new suggestionBO(); suggestionBAL s_bal = new suggestionBAL(); try { s_bo.suggestion_id = nid.incrementer("suggestion_id", "suggestion"); s_bo.user_name = getusername.UserNameFetch(Convert.ToInt32(Session["user_id"])); s_bo.userEmail = getusername.UserEmailFetch(Convert.ToInt32(Session["user_id"])); s_bo.subject = DDLEmailSubject.SelectedValue.ToString(); s_bo.suggestion_msg = writeEmail.Value; writeEmail.Value = ""; //Server.HtmlEncode(hid_Email_body.Value.ToString()); s_bo.date_time = Convert.ToDateTime(DateTime.Now.ToString()); if (s_bal.suggestion_DAL_insert(s_bo) > 0) { Response.Write("<script type='text/javascript'> window.onload=function(){document.getElementById('parent').style.display='block';}; </script>"); //Response.Redirect("~/UserProfile.aspx"); } } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("UserProfileSuggestion.aspx", ex.ToString()); Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>"); } }
protected void send_feedBack(object sender, EventArgs e) { Next_ID nid = new Next_ID(); suggestionBAL sBal = new suggestionBAL(); suggestionBO sBO = new suggestionBO(); try { sBO.user_name = sugName.Value.Trim() + suglName.Value.Trim(); sBO.suggestion_id = nid.incrementer("suggestion_id", "suggestion"); sBO.suggestion_msg = comments.Value; sBO.date_time = Convert.ToDateTime(DateTime.Now.ToString()); sBO.userEmail = txtemail.Value; sBO.subject = ""; if (sBal.suggestion_DAL_insert(sBO) > 0) { Response.Write("<script>alert('Thansk for your valuable feedback ');</script>"); sugName.Value = ""; comments.Value = ""; txtemail.Value = ""; } } catch (Exception ex) { ErrorReportBAL error = new ErrorReportBAL(); error.SendErrorReport("ContachUs.aspx", ex.ToString()); Response.Write("<script>alert('An error occured \n Sorry for inconvenience ');</script>"); } }