protected void ImageButton3_Click(object sender, ImageClickEventArgs e) { int row = Table1.Rows.Count; bool flag = false; string emp = "", pos = ""; for (int i = 1; i < row; i++) { RadioButton check = new RadioButton(); check = (RadioButton)Table1.Rows[i].Cells[8].Controls[0]; if (check.Checked) { emp = Table1.Rows[i].Cells[1].Text; pos = Table1.Rows[i].Cells[2].Text; flag = true; continue; } } if (!flag) { Label5.Visible = true; return; } Employee_pros pros = new Employee_pros(); int poId = pros.gerPositionId(emp, pos); int intId = pros.getInterviewId(emp, Session["user"].ToString().TrimEnd(), poId); Session["intId"] = intId.ToString(); Response.Redirect("InterviewDetails.aspx"); }
protected void getdates() { Employee_pros pros = new Employee_pros(); int positionId = pros.gerPositionId(Session["user"].ToString().TrimEnd(), DropDownList1.SelectedItem.ToString()); dates = pros.getPositionDates(positionId); }
protected void ImageButton2_Click(object sender, ImageClickEventArgs e) { int row = Table1.Rows.Count; string name = ""; bool flag = false; for (int i = 1; i < row; i++) { RadioButton check = new RadioButton(); check = (RadioButton)Table1.Rows[i].Cells[8].Controls[0]; if (check.Checked) { name = Table1.Rows[i].Cells[1].Text; flag = true; continue; } } if (!flag) { Label2.Visible = true; return; } Employee_pros pros = new Employee_pros(); int positionId = pros.gerPositionId(Session["user"].ToString().TrimEnd(), name); Session["pid"] = positionId.ToString(); Response.Redirect("EditPosition.aspx"); }
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"); }
protected void fill_table() { int count = 0; int type = 0; if (RadioButton1.Checked) { type = 1; } else if (RadioButton2.Checked) { type = -1; } int positionId; Employee_pros pros = new Employee_pros(); if (DropDownList1.SelectedItem.ToString().Equals("ALL")) { positionId = 0; } else { positionId = pros.gerPositionId(Session["user"].ToString().TrimEnd(), DropDownList1.SelectedItem.ToString()); } List <List <string> > details = pros.getInterviews(Session["user"].ToString().TrimEnd(), type, positionId); foreach (List <string> temp in details) { count++; TableRow row = new TableRow(); TableCell number = new TableCell(); number.Text = (count).ToString(); row.HorizontalAlign = HorizontalAlign.Center; number.BackColor = System.Drawing.Color.Silver; TableCell candidate = new TableCell(); candidate.Text = temp[0]; TableCell position = new TableCell(); position.Text = pros.getPositionName(Int32.Parse(temp[1])); position.BackColor = System.Drawing.Color.Silver; TableCell date = new TableCell(); date.Text = temp[2]; TableCell time = new TableCell(); time.Text = temp[3]; time.BackColor = System.Drawing.Color.Silver; TableCell status = new TableCell(); status.Text = temp[5]; TableCell testres = new TableCell(); testres.Text = temp[6]; testres.BackColor = System.Drawing.Color.Silver; TableCell res = new TableCell(); res.Text = temp[7]; TableCell check = new TableCell(); RadioButton ch = new RadioButton(); ch.GroupName = "ch"; check.BackColor = System.Drawing.Color.Silver; check.Controls.Add(ch); row.Cells.Add(number); row.Cells.Add(candidate); row.Cells.Add(position); row.Cells.Add(date); row.Cells.Add(time); row.Cells.Add(status); row.Cells.Add(testres); row.Cells.Add(res); row.Cells.Add(check); Table1.Rows.Add(row); } }