protected void btnClose_Click(object sender, EventArgs e)
        {
            RandomExamApplyBLL objBll = new RandomExamApplyBLL();

            objBll.DelRandomExamApply(Convert.ToInt32(hfID.Value));
            Response.Write("<script>top.close();</script>");
        }
        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();
            }
        }