Пример #1
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
        }
Пример #2
0
        private Boolean CanExam(string idCardNo, out string examineeId)
        {
            JAAJ_ExamInfo oeiJAAJ_ExamInfo = ScoreData.GetCurrentExamInfo();

            if (oeiJAAJ_ExamInfo != null)
            {
                var oeiJAAJ_ExamineeInfo = ScoreData.GetExamineeInfoByIDNum(idCardNo, oeiJAAJ_ExamInfo.nvcBatchNO);
                if (oeiJAAJ_ExamineeInfo != null)
                {
                    examineeId = oeiJAAJ_ExamineeInfo.nvcExamineeGUID;
                    CommonHelper.examineeInfo = oeiJAAJ_ExamineeInfo;
                    var oepiJAAJ_ExamProceInfo = ScoreData.GetExamProceInfoByExamineeID(oeiJAAJ_ExamineeInfo.iExamineeID);

                    if (oepiJAAJ_ExamProceInfo != null)
                    {
                        return(true);
                    }
                }
            }
            examineeId = string.Empty;
            return(false);
        }