Exemplo n.º 1
0
        /// <summary>
        /// 开始考试
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            #region 验证考试是否应该参与考试
            JAAJ_ExamInfo oeiJAAJ_ExamInfo = ScoreData.GetCurrentExamInfo();
            if (oeiJAAJ_ExamInfo != null)
            {
                oeiJAAJ_ExamineeInfo = ScoreData.GetExamineeInfoByIDNum(txtIDNum.Text.Trim(), oeiJAAJ_ExamInfo.nvcBatchNO);
                if (oeiJAAJ_ExamineeInfo == null)
                {
                    MessageBox.Show("不存在该考生信息", "提示");
                    return;
                }
            }
            #endregion

            #region 调出对应考试科目的试题显示在终端界面上
            oepiExamProceInfo = ScoreData.GetExamProceInfoByExamineeID(oeiJAAJ_ExamineeInfo.iExamineeID);
            if (oepiExamProceInfo != null)
            {
                int iSubjectItemID = oepiExamProceInfo.iSubjectItemID;
                //下面代码可以根据科目子项ID调出对应的子项对应的试题.....
            }

            #endregion

            #region 修改设备状态为忙碌状态
            EnumSubmitResult oResult = ScoreData.UpdateDeviceStatus(1);
            #endregion
        }
Exemplo n.º 2
0
        ///	<summary>
        ///	获取考生信息实体
        ///	</summary>
        ///	<param name="strIDNum">身份证号</param>
        ///	<param name="strBatchNo">批次号</param>
        ///	<returns>考生信息,JAAJ_ExamineeInfo</returns>
        public static JAAJ_ExamineeInfo GetExamineeInfoByIDNum(string strIDNum, string strBatchNo)
        {
            //string strSqlString = "SELECT * FROM JAAJ_Examinees WHERE nvcIDNum='" + strIDNum + "' AND CHARINDEX(nvcBatchNO,'" + strBatchNo + "')>0 ";
            string            strSqlString = "SELECT * FROM JAAJ_Examinees WHERE nvcIDNum='" + strIDNum + "'";
            SqlDatabase       odbDataBase  = new SqlDatabase(connectionString);
            DbCommand         odbCommand   = odbDataBase.GetSqlStringCommand(strSqlString);
            JAAJ_ExamineeInfo oInfo        = null;

            try
            {
                using (IDataReader reader = odbDataBase.ExecuteReader(odbCommand))
                {
                    if (reader.Read())
                    {
                        oInfo = new JAAJ_ExamineeInfo();
                        ModelHelper.LoadInfoData(oInfo, reader);
                        if (!oInfo.bSex)
                        {
                            oInfo.nvcSexName = PublicMethod.GetEnumShowName(CommonEnum.Sex.Man, (int)CommonEnum.Sex.Man);
                        }
                        else
                        {
                            oInfo.nvcSexName = PublicMethod.GetEnumShowName(CommonEnum.Sex.Woman, (int)CommonEnum.Sex.Woman);
                        }
                    }
                }
            }
            catch (Exception oeException)
            {
                throw new Exception(oeException.Message, oeException);
            }
            return(oInfo);
        }
Exemplo n.º 3
0
        private void CanExam(IAsyncResult result)
        {
            AsyncResult ar = (AsyncResult)result;
            MyDelegate  md = (MyDelegate)ar.AsyncDelegate;
            IDCard      IC = md.EndInvoke(result);

            if (IC == null)
            {
                Messenger.Default.Send <string>("          读卡器未连接", "ShowTip");
                return;
            }
            Name    = IC.Name;
            Sex     = IC.Sex;
            Nation  = IC.Nation;
            Address = IC.Address;
            IDCode  = IC.IDCode;

            #region 验证考试是否应该参与考试
            try
            {
                JAAJ_ExamineeInfo  oeiJAAJ_ExamineeInfo   = null;
                JAAJ_ExamInfo      oeiJAAJ_ExamInfo       = ScoreData.GetCurrentExamInfo();
                JAAJ_ExamProceInfo oepiJAAJ_ExamProceInfo = null;
                if (oeiJAAJ_ExamInfo != null)
                {
                    oeiJAAJ_ExamineeInfo = ScoreData.GetExamineeInfoByIDNum(IDCode, oeiJAAJ_ExamInfo.nvcBatchNO);
                    if (oeiJAAJ_ExamineeInfo != null)
                    {
                        ExamineeID = oeiJAAJ_ExamineeInfo.nvcExamineeGUID;
                        CommonHelper.examineeInfo = oeiJAAJ_ExamineeInfo;
                        oepiJAAJ_ExamProceInfo    = ScoreData.GetExamProceInfoByExamineeID(oeiJAAJ_ExamineeInfo.iExamineeID);

                        if (oepiJAAJ_ExamProceInfo != null)
                        {
                            Messenger.Default.Send <string>("", "GoMainView");
                            return;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                //LogImpl.Error(string.Format("{0}{2}{1}", ex.StackTrace, ex.Message, System.Environment.NewLine));
            }
            Messenger.Default.Send <string>("        未安排在此考试\n     请联系考务人员解决", "ShowWarning");
            #endregion
        }