//protected void GridActionRegistered(object sender, GridViewCommandEventArgs e) //{ // int tripId = Convert.ToInt32(Request.QueryString["tripId"]); // GridViewRow row = GridViewRegistered.SelectedRow; // string IDOFPAGE = row.Cells[0].Text; // if (e.CommandName == "Shortlist") // { // TripDAO TripDAO = new TripDAO(); // Trip TripList = new Trip(); // int TRIPPYLIST; // TRIPPYLIST = TripDAO.updateShortlisted(IDOFPAGE, tripId); // } // else if (e.CommandName == "Norminate") // { // } // else if (e.CommandName == "WaitingList") // { // } //} protected void GridActionRegistered(object sender, GridViewCommandEventArgs e) { int tripId = Convert.ToInt32(Request.QueryString["tripId"]); GridViewRow row = GridViewRegistered.SelectedRow; string RegisterID = e.CommandArgument.ToString(); int staffId = Convert.ToInt32(Session["StaffId"]); if (e.CommandName == "Shortlist") { TripDAO TripDAO = new TripDAO(); Trip TripList = new Trip(); int TRIPPYLIST; TRIPPYLIST = TripDAO.updateShortlisted(RegisterID, tripId); InterviewDAO intDao = new InterviewDAO(); string adminNo = intDao.exchangeRegIdForAdminNo(RegisterID); int updateStuds = intDao.selectForInterview(adminNo, staffId, tripId); Response.Redirect(Request.RawUrl); } else if (e.CommandName == "Norminate") { TripDAO TripDAO = new TripDAO(); Trip TripList = new Trip(); int TRIPPYLIST; TRIPPYLIST = TripDAO.updateNorminate(RegisterID, tripId, staffId); Response.Redirect(Request.RawUrl); } else if (e.CommandName == "Move to waiting list") { TripDAO TripDAO = new TripDAO(); Trip TripList = new Trip(); int TRIPPYLIST; TRIPPYLIST = TripDAO.updateWaitingList(RegisterID, tripId); Response.Redirect(Request.RawUrl); } else { return; } }