protected void btnSavePlanning_Click(object sender, EventArgs e) { try { int iCrewID = GetCrewID(); string PlanDateTime = txtPlanDate.Text + " " + ddlPlanH.Text + ":" + ddlPlanM.Text; if (int.Parse(ddlPlanH.Text) < 12) { PlanDateTime += " AM"; } else { PlanDateTime += " PM"; } int iInterviewID = BLL_Crew_Interview.INS_CrewInterviewPlanning(iCrewID, int.Parse(ddlPlanRank.SelectedValue), txtPlanCrewName.Text, PlanDateTime, int.Parse(ddlPlanInterviewer.SelectedValue), txtPlanInterviewerPosition.Text, GetSessionUserID()); hdnInterviewID.Value = iInterviewID.ToString(); lblMessage.Text = "Interview planned for " + txtPlanCrewName.Text; txtInterviewDate.Text = DateTime.Today.ToString("dd/MM/yyyy"); ddlRank.SelectedValue = ddlPlanRank.SelectedValue; string InterviewPlannedDate = ""; string InterviewID = ""; int iUserID = GetSessionUserID(); string CrewName = objCrewBLL.Get_CrewPersonalDetailsByID(iCrewID, "staff_name"); DataTable dt = BLL_Crew_Interview.Get_PlannedInterviewDetails(iUserID, iCrewID); if (dt.Rows.Count > 0) { InterviewID = dt.Rows[0]["ID"].ToString(); InterviewPlannedDate = dt.Rows[0]["InterviewPlanDate"].ToString(); hdnInterviewID.Value = InterviewID; ddlRank.SelectedValue = dt.Rows[0]["Rank"].ToString(); ddlRank.Enabled = false; txtPersonInterviewed.Text = CrewName; //getQueryString("Name"); txtPersonInterviewed.Enabled = false; txtInterviewDate.Text = DateTime.Today.ToString(Convert.ToString(Session["User_DateFormat"])); txtInterviewDate.Enabled = false; lblPlannedDate.Text = UDFLib.ConvertUserDateFormatTime(Convert.ToString(dt.Rows[0]["InterviewPlanDate"])); lblPlannedBy.Text = dt.Rows[0]["PlannedBy"].ToString(); pnlInterviewPlanning.Visible = false; pnlEdit_InterviewResult.Visible = true; } } catch (Exception ex) { lblMessage.Text = ex.Message; } }