protected void btnFeedback_Click(object sender, EventArgs e) { ////Add Exception handilng try catch change by vishal 21-05-2012 try { int userid = Convert.ToInt32(Request.QueryString[0]); ObjCustomerfeedback = ObjCustomerfeedback.Get_By_Incidentid(userid); if (satisfiedrdbutton.Checked == true) { Feedback = "Satisfied"; } if (verysatisfied.Checked == true) { Feedback = "Very Satisfied"; } if (Rddisatisfied.Checked == true) { Feedback = "Dissatisfied"; } if (Rdverydissatisfied.Checked == true) { Feedback = "Very Dissatisfied"; } if (ObjCustomerfeedback.Id == 0) { ObjCustomerfeedback.Id = Convert.ToInt32(Request.QueryString[0]); ObjCustomerfeedback.Feedback = Feedback; ObjCustomerfeedback.Insert(); } string myScript; myScript = "<script language=javascript></script>"; myScript = "<script language=javascript>CloseWindow();</script>"; Page.RegisterClientScriptBlock("MyScript", myScript); //ScriptManager.RegisterStartupScript(this, this.GetType(), "refreshParent();", "refreshParent();", true); } catch (Exception ex) { string myScript; myScript = "<script language=javascript>alert('Exception - '" + ex + "');</script>"; Page.RegisterClientScriptBlock("MyScript", myScript); return; } }
protected void btnFeedback_Click(object sender, EventArgs e) {////Add Exception handilng try catch change by vishal 21-05-2012 try { int userid = Convert.ToInt32(Request.QueryString[0]); ObjCustomerfeedback = ObjCustomerfeedback.Get_By_Incidentid(userid); if (satisfiedrdbutton.Checked == true) { Feedback = "Satisfied"; } if (verysatisfied.Checked == true) { Feedback = "Very Satisfied"; } if (Rddisatisfied.Checked == true) { Feedback = "Dissatisfied"; } if (Rdverydissatisfied.Checked == true) { Feedback = "Very Dissatisfied"; } if (ObjCustomerfeedback.Id == 0) { ObjCustomerfeedback.Id = Convert.ToInt32(Request.QueryString[0]); ObjCustomerfeedback.Feedback = Feedback; ObjCustomerfeedback.Insert(); } string myScript; myScript = "<script language=javascript></script>"; myScript = "<script language=javascript>CloseWindow();</script>"; Page.RegisterClientScriptBlock("MyScript", myScript); //ScriptManager.RegisterStartupScript(this, this.GetType(), "refreshParent();", "refreshParent();", true); } catch (Exception ex) { string myScript; myScript = "<script language=javascript>alert('Exception - '" + ex + "');</script>"; Page.RegisterClientScriptBlock("MyScript", myScript); return; } }
protected void btnFeedback_Click(object sender, EventArgs e) { if (satisfiedrdbutton.Checked == false && verysatisfied.Checked == false && Rddisatisfied.Checked == false && Rdverydissatisfied.Checked == false) { Lblmsg.Visible = true; Lblmsg.Text = "Please select your feedback"; return; } //if (satisfiedrdbutton.Checked == true && verysatisfied.Checked == true && Rddisatisfied.Checked == true && Rdverydissatisfied.Checked == true) //{ // Lblmsg0.Visible = true; // Lblmsg0.Text = "Your feedback has been saved"; // return; //} int userid = Convert.ToInt16(Request.QueryString["userid"]); //////////////Added by lalit. capture querystring of callid in case when user gives //feedback by call if (Request.QueryString["Clid"] != null) { int callid = Convert.ToInt16(Request.QueryString["Clid"]); ObjCustomerfeedback = ObjCustomerfeedback.Get_By_Userid_ByIncidentId(userid, callid); } else { ObjCustomerfeedback = ObjCustomerfeedback.Get_By_Incidentid(userid); } if (satisfiedrdbutton.Checked == true) { Feedback = "Good"; } if (verysatisfied.Checked == true) { Feedback = "Very Good"; } if (Rddisatisfied.Checked == true) { Feedback = "Average"; } if (Rdverydissatisfied.Checked == true) { Feedback = "Poor"; } if (ObjCustomerfeedback.Id == 0) { ObjCustomerfeedback.Id = Convert.ToInt16(Request.QueryString["userid"]); ObjCustomerfeedback.Feedback = Feedback; if (Request.QueryString["Clid"] != null) { ObjCustomerfeedback.IncidentId = Convert.ToInt16(Request.QueryString["Clid"]); ObjCustomerfeedback.FeedbackType = "CallWise"; ObjCustomerfeedback.Remark = TextRmk.Text; ObjCustomerfeedback.Insert_CallWise(); Lblmsg0.Visible = true; Lblmsg0.Text = "Your Feedback Has Been Submitted"; btnFeedback.Visible = false; satisfiedrdbutton.Visible = false; verysatisfied.Visible = false; Rddisatisfied.Visible = false; Rdverydissatisfied.Visible = false; TextRmk.Visible = false; labGood.Visible = false; labVeryGood.Visible = false; labAverage.Visible = false; labPoor.Visible = false; lblApproved.Visible = false; lblRemark.Visible = false; } else { ObjCustomerfeedback.FeedbackType = "Default"; ObjCustomerfeedback.Remark = "Default"; ObjCustomerfeedback.Insert(); } } string myScript; myScript = "<script language=javascript></script>"; myScript = "<script language=javascript>CloseWindow();</script>"; Page.RegisterClientScriptBlock("MyScript", myScript); //ScriptManager.RegisterStartupScript(this, this.GetType(), "refreshParent();", "refreshParent();", true); }