protected void btnSendForFeedback_Click(object sender, EventArgs e) { try { if (ddlFeedbackFrom.SelectedValue.ToString() != "0") { if (UDFLib.ConvertDateToNull(UDFLib.ConvertToDefaultDt(txtDueDate.Text)) >= DateTime.Now.Date && UDFLib.ConvertDateToNull(UDFLib.ConvertToDefaultDt(txtDueDate.Text)) != null) { if (!UDFLib.DateCheck(txtDueDate.Text)) { lblMsg.Text = "**Enter Valid Due Date" + TodayDateFormat; return; } if (txtReqComment.Text.Trim() != "") { int ID = UDFLib.ConvertToInteger(Request.QueryString["ID"].ToString()); int Vessel_ID = UDFLib.ConvertToInteger(Request.QueryString["Vessel_ID"].ToString()); int Office_ID = UDFLib.ConvertToInteger(Request.QueryString["Office_ID"].ToString()); int Requested_From = Convert.ToInt32(ddlFeedbackFrom.SelectedValue); int? FeedbackCategory_ID = null; string Evaluation_ID = Request.QueryString["Evaluation_ID"].ToString(); string Month = Request.QueryString["Month"].ToString(); string Schedule_ID = Request.QueryString["Schedule_ID"].ToString(); int Crew_ID = UDFLib.ConvertToInteger(Request.QueryString["Crew_ID"].ToString()); BLL_Crew_Evaluation.INS_CrewEvaluationFeedbackRequest_Details(ID, Vessel_ID, Office_ID, GetSessionUserID(), Requested_From, UDFLib.ConvertDateToNull(txtDueDate.Text), Evaluation_ID, Month, Schedule_ID, Crew_ID, txtReqComment.Text.Trim(), FeedbackCategory_ID); Load_CrewEvaluationFeedbackRequest(); ddlFeedbackFrom.SelectedValue = "0"; txtDueDate.Text = ""; lblMsg.Text = ""; txtReqComment.Text = ""; } else { lblMsg.Text = "**Requestor's comment cannot be empty."; return; } } else { if (!UDFLib.DateCheck(txtDueDate.Text)) { lblMsg.Text = "**Enter Valid Due Date" + TodayDateFormat; return; } lblMsg.Text = "**Due Date cannot be empty and less than today's date."; return; } } else { lblMsg.Text = "**Feedback From cannot be empty."; return; } } catch (Exception ex) { UDFLib.WriteExceptionLog(ex); } }