protected void CallBack1_Callback(object sender, ComponentArt.Web.UI.CallBackEventArgs e) { if (hfID.Value != "") { RandomExamApplyBLL objBll = new RandomExamApplyBLL(); RandomExamApply obj = objBll.GetRandomExamApply(Convert.ToInt32(hfID.Value)); if (obj.RandomExamApplyID != 0) { if (obj.ApplyStatus == 1) { hfNow.Value = "1"; } else { hfNow.Value = "0"; } } else { hfNow.Value = "-1"; } } else { hfNow.Value = "0"; } hfNow.RenderControl(e.Output); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack && !gridCallback.IsCallback) { BindGrid(); } string strChoose = Request.Form.Get("ChooseID"); if (strChoose != "" && strChoose != null) { RandomExamApplyBLL objBll = new RandomExamApplyBLL(); string[] str = strChoose.ToString().Split(','); string strEmployeeID = ""; for (int i = 0; i < str.Length; i++) { RandomExamApply obj = objBll.GetRandomExamApply(Convert.ToInt32(str[i])); if (("," + strEmployeeID + ",").IndexOf("," + obj.RandomExamID + "#" + obj.EmployeeID + ",") < 0) { if (strEmployeeID == "") { strEmployeeID = obj.RandomExamID + "#" + obj.EmployeeID.ToString(); } else { strEmployeeID = strEmployeeID + "," + obj.RandomExamID + "#" + obj.EmployeeID; } } else { SessionSet.PageMessage = "不能同时通过同一考生的两次同一考试请求!"; ClientScript.RegisterStartupScript(GetType(), "jsSelectFirstNode", @"getGrid('" + strChoose + "');", true); return; } } for (int i = 0; i < str.Length; i++) { objBll.UpdateRandomExamApplyStatus(Convert.ToInt32(str[i]), 1); } BindGrid(); } string strChooseID = Request.Form.Get("ChooseOneID"); if (strChooseID != "" && strChooseID != null) { string[] str = strChooseID.Split('|'); string strApplyID = str[0]; string strEmployeeID = str[1]; RandomExamApplyBLL objBll = new RandomExamApplyBLL(); RandomExamApply objApply = objBll.GetRandomExamApply(Convert.ToInt32(strApplyID)); IList <RandomExamApply> objList = objBll.GetRandomExamApplyByOrgID(Convert.ToInt32(Request.QueryString.Get("OrgID")), PrjPub.ServerNo.ToString()); foreach (RandomExamApply apply in objList) { if (apply.RandomExamApplyID.ToString() != strApplyID && apply.RandomExamID == objApply.RandomExamID && apply.EmployeeID.ToString() == strEmployeeID && apply.ApplyStatus == 1) { SessionSet.PageMessage = "已有该考生的考试请求获得通过!"; ClientScript.RegisterStartupScript(GetType(), "jsSelectFirstNode", @"getGrid('" + strApplyID + "');", true); return; } } objBll.UpdateRandomExamApplyStatus(Convert.ToInt32(strApplyID), 1); BindGrid(); } string strDel = Request.Form.Get("deleteid"); if (strDel != "" && strDel != null) { RandomExamApplyBLL objBll = new RandomExamApplyBLL(); objBll.DelRandomExamApply(Convert.ToInt32(strDel)); BindGrid(); } }