protected void addInterview() { Employee_pros pros = new Employee_pros(); string emp_user = Session["user"].ToString().TrimEnd(); string can_user = TextBox1.Text; int positionId = pros.gerPositionId(emp_user, DropDownList1.SelectedItem.ToString()); DateTime date = Calendar1.SelectedDate; TimeSpan time = new TimeSpan(Int32.Parse(DropDownList3.SelectedItem.ToString()), Int32.Parse(DropDownList4.SelectedItem.ToString()), 0); int dur = Int32.Parse(DropDownList2.SelectedValue); if (pros.check_timing(emp_user, date, time, dur) == false) { Label19.Text = "Selected time is overlaped with another interview"; Label19.Visible = true; return; } pros.newInterview(emp_user, can_user, positionId, date, time, dur); Response.Redirect("CheckInterview.aspx"); }