private void fnUILoadStudentRecord(FpStudentObject fso, TempStudentInfo tso) { if (fso == null) { this.lbAlertMsg.Visible = true; this.lbAlertMsg.Text = "没有该学员的指纹记录信息"; } else if (tso == null) { this.lbAlertMsg.Visible = true; this.lbAlertMsg.Text = "没有该学员的个人信息"; } else { fso.fromTempStudentInfo(tso); try { this.lbName.Text = fso.NAME; this.lbSex.Text = fso.SEX; this.lbIdCard.Text = fso.IDCARD; this.imgPerson.ImageUrl = string.Format("~/ShowImage.aspx?idcardtype=A&idcard={0}", fso.IDCARD); this.lbIDCardType.Text = "第二代身份证"; this.lbBrithday.Text = DateTimeHelper.fnIsNewDateTime(fso.BRITHDAY) ? "" : fso.BRITHDAY.ToString(); this.lbPhone.Text = fso.PHONE; this.lbAddress.Text = fso.ADDRESS; this.lbDrvSchool.Text = fso.DRV_SCHOOL; this.lbDocNum.Text = fso.DRV_DOCNUM; this.lbDrvType.Text = fso.DRV_TYPE; this.lbRemark.Text = fso.REMARK; this.lbAlertMsg.Text = ""; } catch (NullReferenceException nre) { } } }
protected void Page_Load(object sender, EventArgs e) { string lStrIDCard = ""; if (Request.Params[FPSystemBiz.PARAM_RESULT] == null) { return; } lStrIDCard = Request.Params[FPSystemBiz.PARAM_RESULT].ToString(); if (lStrIDCard.Length < 1) { this.lbAlertMsg.Text = "没有该学员的指纹信息"; return; } //int lIntResultCode = FPSystemBiz.fnIdendityStudentLesson(lStrIDCard); //lStrIDCard = "'" + lStrIDCard + "'"; //FpStudentObject fso = SimpleOrmOperator.Query<FpStudentObject>(lStrIDCard); TempStudentInfo tempStudentInfo = DrvQueryHelper.QueryStudent(lStrIDCard); FpStudentObject fso = new FpStudentObject(); if (tempStudentInfo == null && 1 == 2) { this.lbAlertMsg.Visible = true; this.lbAlertMsg.Text = "没有该学员的个人信息"; return; } fso.fromTempStudentInfo(tempStudentInfo); Session[SESSION_STUDENT] = fso; this.fnUILoadStudentRecord(fso, tempStudentInfo); }
private void fnUILoadStudentRecord(FpStudentObject pFso, int pResultCode) { string datePattern = "yyyy-MM-dd HH:mm:ss"; this.lbStuLessonEnter1.Value = DateTimeHelper.fnIsNewDateTime(pFso.LESSON_ENTER_1) ? "" : pFso.LESSON_ENTER_1.ToString(datePattern); this.lbStuLessonLeave1.Value = DateTimeHelper.fnIsNewDateTime(pFso.LESSON_LEAVE_1) ? "" :pFso.LESSON_LEAVE_1.ToString(datePattern); this.lbStuLessonEnter2.Value = DateTimeHelper.fnIsNewDateTime(pFso.LESSON_ENTER_2) ? "" :pFso.LESSON_ENTER_2.ToString(datePattern); this.lbStuLessonLeave2.Value = DateTimeHelper.fnIsNewDateTime(pFso.LESSON_LEAVE_2) ? "" :pFso.LESSON_LEAVE_2.ToString(datePattern); this.lbStuTrainEnter1.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_1) ? "" : pFso.TRAIN_ENTER_1.ToString(datePattern); this.lbStuTrainLeave1.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_1) ? "" : pFso.TRAIN_LEAVE_1.ToString(datePattern); this.lbStuTrainEnter2.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_2) ? "" : pFso.TRAIN_ENTER_2.ToString(datePattern); this.lbStuTrainLeave2.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_2) ? "" : pFso.TRAIN_LEAVE_2.ToString(datePattern); this.lbStuTrainEnter3.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_3) ? "" : pFso.TRAIN_ENTER_3.ToString(datePattern); this.lbStuTrainLeave3.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_3) ? "" : pFso.TRAIN_LEAVE_3.ToString(datePattern); this.lbStuTrainEnter4.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_4) ? "" : pFso.TRAIN_ENTER_4.ToString(datePattern); this.lbStuTrainLeave4.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_4) ? "" : pFso.TRAIN_LEAVE_4.ToString(datePattern); this.lbStuTrainEnter5.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_5) ? "" : pFso.TRAIN_ENTER_5.ToString(datePattern); this.lbStuTrainLeave5.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_5) ? "" : pFso.TRAIN_LEAVE_5.ToString(datePattern); this.lbStuTrainEnter6.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_6) ? "" : pFso.TRAIN_ENTER_6.ToString(datePattern); this.lbStuTrainLeave6.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_6) ? "" : pFso.TRAIN_LEAVE_6.ToString(datePattern); this.lbStuTrainEnter7.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_7) ? "" : pFso.TRAIN_ENTER_7.ToString(datePattern); this.lbStuTrainLeave7.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_7) ? "" : pFso.TRAIN_LEAVE_7.ToString(datePattern); this.lbStuTrainEnter8.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_8) ? "" : pFso.TRAIN_ENTER_8.ToString(datePattern); this.lbStuTrainLeave8.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_8) ? "" : pFso.TRAIN_LEAVE_8.ToString(datePattern); this.lbStuKm1Enter.Value = DateTimeHelper.fnIsNewDateTime(pFso.KM1_ENTER) ? "" : pFso.KM1_ENTER.ToString(datePattern); this.lbStuKm2Enter.Value = DateTimeHelper.fnIsNewDateTime(pFso.KM2_ENTER) ? "" : pFso.KM2_ENTER.ToString(datePattern); this.lbStuKm3Enter.Value = DateTimeHelper.fnIsNewDateTime(pFso.KM3_ENTER) ? "" : pFso.KM3_ENTER.ToString(datePattern); this.lbKM23IN9ENTER.Value = DateTimeHelper.fnIsNewDateTime(pFso.KM2_3IN9_ENTER) ? "" : pFso.KM2_3IN9_ENTER.ToString(datePattern); this.lbStuTrainEndDate.Value = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_END_DATE) ? "" : pFso.TRAIN_END_DATE.ToString(datePattern); this.ddlStatue.SelectedValue = pFso.STATUE.ToString(); this.btnSave.Enabled = true; }
private void fnUILoadStudentRecord(FpStudentObject fso,TempStudentInfo tso) { if (fso == null) { this.lbAlertMsg.Visible = true; this.lbAlertMsg.Text = "没有该学员的指纹记录信息"; } else if (tso == null) { this.lbAlertMsg.Visible = true; this.lbAlertMsg.Text = "没有该学员的个人信息"; } else { fso.fromTempStudentInfo(tso); try { this.lbName.Text = fso.NAME; this.lbSex.Text = fso.SEX; this.lbIdCard.Text = fso.IDCARD; this.imgPerson.ImageUrl = string.Format("~/ShowImage.aspx?idcardtype=A&idcard={0}", fso.IDCARD); this.lbIDCardType.Text = "第二代身份证"; this.lbBrithday.Text = DateTimeHelper.fnIsNewDateTime(fso.BRITHDAY) ? "" : fso.BRITHDAY.ToString(); this.lbPhone.Text = fso.PHONE; this.lbAddress.Text = fso.ADDRESS; this.lbDrvSchool.Text = fso.DRV_SCHOOL; this.lbDocNum.Text = fso.DRV_DOCNUM; this.lbDrvType.Text = fso.DRV_TYPE; this.lbRemark.Text = fso.REMARK; this.lbAlertMsg.Text = ""; } catch (NullReferenceException nre) { } } }
public FpStudentCleared(FpStudentObject fso) { this.idcard = fso.IDCARD; this.carType = fso.CAR_TYPE; this.localtype = fso.LOCALTYPE; this.schoolCode = fso.SCHOOL_CODE; }
protected void btnQuery_Click(object sender, EventArgs e) { string queryText = ddlQueryType.SelectedItem.Text; string queryType = ddlQueryType.SelectedValue; string quserValue = txtQueryValue.Text; string condition = string.Format("where {0} like '%{1}'", queryType, quserValue); if (string.IsNullOrEmpty(quserValue)) { WebTools.Alert("查询条件不能为空"); return; } ArrayList fsos = SimpleOrmOperator.QueryConditionList <FpStudentObject>(condition); if (fsos.Count == 1) { FpStudentObject fso = fsos[0] as FpStudentObject; fnUILoadStudentRecord(fso, 0); ucStudentInfo.fnUILoadStudentRecord(fso); } else if (fsos.Count == 0) { WebTools.Alert(string.Format("{0}为\"{1}\" 的学员不存在", queryText, quserValue)); } else if (fsos.Count > 1) { WebTools.Alert(string.Format("{0}为\"{1}\" 的学员存在多个,请使用证件号码查询", queryText, quserValue)); } this.txtQueryValue.Text = string.Empty; this.txtQueryValue.Focus(); }
private void fnUILoadStudentRecord(FpStudentObject pFso, int pResultCode) { //this.lbStrName.Text = pFso.NAME; //this.lbStuIdCard.Text = pFso.IDCARD; this.lbStuLessonEnter1.Text = DateTimeHelper.fnIsNewDateTime(pFso.LESSON_ENTER_1) ? "" : pFso.LESSON_ENTER_1.ToString(); this.lbStuLessonLeave1.Text = DateTimeHelper.fnIsNewDateTime(pFso.LESSON_LEAVE_1) ? "" : pFso.LESSON_LEAVE_1.ToString(); this.lbStuLessonEnter2.Text = DateTimeHelper.fnIsNewDateTime(pFso.LESSON_ENTER_2) ? "" : pFso.LESSON_ENTER_2.ToString(); this.lbStuLessonLeave2.Text = DateTimeHelper.fnIsNewDateTime(pFso.LESSON_LEAVE_2) ? "" : pFso.LESSON_LEAVE_2.ToString(); if (pResultCode == FPSystemBiz.LESSON_ENTER_1_FAILE) { this.lbStudentAlertMsg.Text = "本次上课与上次不在同一天进行,旧上课记录已被清空,请再次确认上课"; } else if (pResultCode == FPSystemBiz.LESSON_ENTER_2_FAILE) { this.lbStudentAlertMsg.Text = "下午上课确认失败"; } else if (pResultCode == FPSystemBiz.LESSON_LEAVE_2_FAILE) { this.lbStudentAlertMsg.Text = "下午离场确认失败"; } else if (pResultCode == FPSystemBiz.LESSON_FINISH) { this.lbStudentAlertMsg.Text = "学员已完成上课考勤"; } this.lbStudentAlertMsg.Text = pFso.REMARK; }
protected void btnSave_Click(object sender, EventArgs e) { FpStudentObject pFso = ViewState[typeof(FpStudentObject).Name] as FpStudentObject; Random random = new Random(); pFso.LESSON_ENTER_1 = DateTimeHelper.fnParseDateTime(this.lbStuLessonEnter1.Value, default(DateTime)); pFso.LESSON_LEAVE_1 = DateTimeHelper.fnParseDateTime(this.lbStuLessonLeave1.Value, default(DateTime)); pFso.LESSON_ENTER_2 = DateTimeHelper.fnParseDateTime(this.lbStuLessonEnter2.Value, default(DateTime)); pFso.LESSON_LEAVE_2 = DateTimeHelper.fnParseDateTime(this.lbStuLessonLeave2.Value, default(DateTime)); pFso.TRAIN_ENTER_1 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter1.Value, default(DateTime)); pFso.TRAIN_LEAVE_1 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave1.Value, default(DateTime)); pFso.TRAIN_ENTER_2 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter2.Value, default(DateTime)); pFso.TRAIN_LEAVE_2 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave2.Value, default(DateTime)); pFso.TRAIN_ENTER_3 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter3.Value, default(DateTime)); pFso.TRAIN_LEAVE_3 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave3.Value, default(DateTime)); pFso.TRAIN_ENTER_4 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter4.Value, default(DateTime)); pFso.TRAIN_LEAVE_4 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave4.Value, default(DateTime)); pFso.TRAIN_ENTER_5 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter5.Value, default(DateTime)); pFso.TRAIN_LEAVE_5 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave5.Value, default(DateTime)); pFso.TRAIN_ENTER_6 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter6.Value, default(DateTime)); pFso.TRAIN_LEAVE_6 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave6.Value, default(DateTime)); pFso.TRAIN_ENTER_7 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter7.Value, default(DateTime)); pFso.TRAIN_LEAVE_7 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave7.Value, default(DateTime)); pFso.TRAIN_ENTER_8 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter8.Value, default(DateTime)); pFso.TRAIN_LEAVE_8 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave8.Value, default(DateTime)); pFso.KM1_ENTER = DateTimeHelper.fnParseDateTime(this.lbStuKm1Enter.Value, default(DateTime)); pFso.KM2_ENTER = DateTimeHelper.fnParseDateTime(this.lbStuKm2Enter.Value, default(DateTime)); pFso.KM3_ENTER = DateTimeHelper.fnParseDateTime(this.lbStuKm3Enter.Value, default(DateTime)); pFso.KM2_3IN9_ENTER = DateTimeHelper.fnParseDateTime(this.lbKM23IN9ENTER.Value, default(DateTime)); pFso.TRAIN_END_DATE = DateTimeHelper.fnParseDateTime(this.lbStuTrainEndDate.Value, default(DateTime)); pFso.STATUE = Convert.ToInt32(ddlStatue.SelectedValue); if (SimpleOrmOperator.Update(pFso)) { WebTools.Alert("学员信息保存成功"); } else { return; } }
private void FpVerifyHandler(object o, EventArgs e) { ResultCodeArgs re = (ResultCodeArgs)e; string[] lStrUserIds = FpBase.getUserIds(re); string idcard = lStrUserIds.Length > 0 ? lStrUserIds[0].ToString() : ""; int rcode = FPSystemBiz.fnIdendityStudentTrain(idcard); if (rcode == FPSystemBiz.CHECHIN_NO_RECARD) { this.lbStudentAlertMsg.Text = "没有该学员的指纹信息"; return; } FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(idcard); if (fso == null) { this.lbStudentAlertMsg.Text = "没有该学员的个人信息"; return; } this.fnUILoadStudentRecord(fso, rcode); this.lbStudentAlertMsg.Text = "指纹确认成功"; }
protected void Page_Load(object sender, EventArgs e) { string lStrIDCard = Request.Params[FPSystemBiz.PARAM_RESULT]; if (string.IsNullOrEmpty(lStrIDCard)) { ///this.lbAlertMsg.Text = "没有该学员的指纹信息"; this.lbAlertMsg.Text = "学员指纹信息不存在"; if (hasSound) { WebTools.PlaySound("../../sound/学员指纹信息不存在.wav"); } return; } //lStrIDCard = Request.Params[FPSystemBiz.PARAM_RESULT].ToString(); //int lIntResultCode = FPSystemBiz.fnIdendityStudentLesson(lStrIDCard); //lStrIDCard = "'" + lStrIDCard + "'"; FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(lStrIDCard); //TempStudentInfo tempStudentInfo= DrvQueryHelper.QueryStudent(lStrIDCard); //FpStudentObject fso = new FpStudentObject(); if (fso == null) { this.lbAlertMsg.Visible = true; this.lbAlertMsg.Text = "没有该学员的个人信息"; return; } //fso.fromTempStudentInfo(tempStudentInfo); Session[SESSION_STUDENT] = fso; this.fnUILoadStudentRecord(fso, new TempStudentInfo()); }
protected void DataGrid1_ItemCommand1(object source, DataGridCommandEventArgs e) { if (e.CommandName == "Clear") { string idcard = e.CommandArgument.ToString(); //ZwTpOperator.Delete(id); FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(idcard); fso.KM3_VERIFY = "Y"; // fso.FEE_VERIFY_DATE = DateTime.Now; //string idcard = fso.IDCARD.Trim('\''); fso.IDCARD = "'" + idcard + "'"; if (SimpleOrmOperator.Delete(fso)) { //fso.IDCARD = fso.IDCARD.Trim('\''); _FP.FpDeleteUser(idcard); if (fso.STATUE >= FpStudentObject.STATUE_KM3_ENTER) { fso.IDCARD = idcard; FpStudentCleared cleared = new FpStudentCleared(fso); SimpleOrmOperator.Create(cleared); } WebTools.Alert(this, string.Format("{0}:{1} 学员记录删除成功!", fso.LSH, fso.NAME)); } else { WebTools.Alert(this, string.Format("{0}:{1} 学员记录删除失败!", fso.LSH, fso.NAME)); } this.ProcedurePager1.Changed = true; } }
protected void Page_Load(object sender, EventArgs e) { string lStrIDCard = ""; if (Request.Params[FPSystemBiz.PARAM_RESULT] == null) return ; lStrIDCard = Request.Params[FPSystemBiz.PARAM_RESULT].ToString(); if (lStrIDCard.Length < 1) { this.lbAlertMsg.Text = "没有该学员的指纹信息"; return; } //int lIntResultCode = FPSystemBiz.fnIdendityStudentLesson(lStrIDCard); //lStrIDCard = "'" + lStrIDCard + "'"; //FpStudentObject fso = SimpleOrmOperator.Query<FpStudentObject>(lStrIDCard); TempStudentInfo tempStudentInfo= DrvQueryHelper.QueryStudent(lStrIDCard); FpStudentObject fso = new FpStudentObject(); if (tempStudentInfo == null&&1==2) { this.lbAlertMsg.Visible = true; this.lbAlertMsg.Text = "没有该学员的个人信息"; return; } fso.fromTempStudentInfo(tempStudentInfo); Session[SESSION_STUDENT] = fso; this.fnUILoadStudentRecord(fso,tempStudentInfo); }
private void fnUILoadStudentRecord(FpStudentObject pFso, int pResultCode) { this.lbStuTrainEnter1.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_1) ? "" : pFso.TRAIN_ENTER_1.ToString(); this.lbStuTrainLeave1.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_1) ? "" : pFso.TRAIN_LEAVE_1.ToString(); this.lbStuTrainEnter2.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_2) ? "" : pFso.TRAIN_ENTER_2.ToString(); this.lbStuTrainLeave2.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_2) ? "" : pFso.TRAIN_LEAVE_2.ToString(); this.lbStuTrainEnter3.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_3) ? "" : pFso.TRAIN_ENTER_3.ToString(); this.lbStuTrainLeave3.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_3) ? "" : pFso.TRAIN_LEAVE_3.ToString(); this.lbStuTrainEnter4.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_4) ? "" : pFso.TRAIN_ENTER_4.ToString(); this.lbStuTrainLeave4.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_4) ? "" : pFso.TRAIN_LEAVE_4.ToString(); this.lbStuTrainEnter5.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_5) ? "" : pFso.TRAIN_ENTER_5.ToString(); this.lbStuTrainLeave5.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_5) ? "" : pFso.TRAIN_LEAVE_5.ToString(); this.lbStuTrainEnter6.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_6) ? "" : pFso.TRAIN_ENTER_6.ToString(); this.lbStuTrainLeave6.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_6) ? "" : pFso.TRAIN_LEAVE_6.ToString(); this.lbStuTrainEnter7.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_7) ? "" : pFso.TRAIN_ENTER_7.ToString(); this.lbStuTrainLeave7.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_7) ? "" : pFso.TRAIN_LEAVE_7.ToString(); this.lbStuTrainEnter8.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_8) ? "" : pFso.TRAIN_ENTER_8.ToString(); this.lbStuTrainLeave8.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_8) ? "" : pFso.TRAIN_LEAVE_8.ToString(); if (pResultCode == FPSystemBiz.CHECK_SAMEDAY_FAILE) { this.lbStudentAlertMsg.Text = "你今天的入场训练已完成,同一天不能入场两次"; } else if (pResultCode == FPSystemBiz.CHECKIN_SUCCESS) { this.lbStudentAlertMsg.Text = "指纹确认成功"; } else if (pResultCode == FPSystemBiz.TRAIN_LEAVE_FAILE) { this.lbStudentAlertMsg.Text = "你今天的训练时间未够,提早离场将被视为考勤无效"; } else if (pResultCode == FPSystemBiz.TRAIN_ENTER_FAILE) { this.lbStudentAlertMsg.Text = "你上次的训练未完成,上次的记录将被清空,请再次验证"; } else if( pResultCode==FPSystemBiz.TRAIN_FINISH){ this.lbStudentAlertMsg.Text = "学员已完成入场训练"; } this.lbStudentAlertMsg.Text = pFso.REMARK; // if (pResultCode == FPSystemBiz.LESSON_ENTER_1_FAILE) // { // this.lbStudentAlertMsg.Text = "本次上课与上次不在同一天进行,旧上课记录已被清空,请再次确认上课"; // } // else if (pResultCode == FPSystemBiz.LESSON_ENTER_2_FAILE) // { // this.lbStudentAlertMsg.Text = "下午上课确认失败"; // } // else if (pResultCode == FPSystemBiz.LESSON_LEAVE_2_FAILE) // { // this.lbStudentAlertMsg.Text = "下午离场确认失败"; // } }
public static FpStudentObject QueryByIdcard(FpStudentObject fp) { // ArrayList<FpStudentObject> info = SimpleOrmOperator.QueryConditionList<FpStudentObject>(" where IDCARD=? ", fp.IDCARD);string condition // if (info.Count != 0) // { // return info.IndexOf(0); // } return null; }
public static FpStudentObject QueryByIdcard(FpStudentObject fp) { // ArrayList<FpStudentObject> info = SimpleOrmOperator.QueryConditionList<FpStudentObject>(" where IDCARD=? ", fp.IDCARD);string condition // if (info.Count != 0) // { // return info.IndexOf(0); // } return(null); }
public void fnUILoadStudentRecord(string idcard) { idcard = StringHelper.fnFormatNullOrBlankString(idcard, ""); if (idcard != "") { TempStudentInfo tempStudentInfo = DrvQueryHelper.QueryStudent(idcard); FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(idcard); fnUILoadStudentRecord(fso, tempStudentInfo); } }
private static Boolean fnStundentInsert(FpStudentObject fso) { string lStrInsert = "insert into fp_student (idcard,name) values ('{0}','{1}')"; lStrInsert = string.Format(lStrInsert, fso.IDCARD, //0 fso.NAME //1 ); return(FT.DAL.DataAccessFactory.GetDataAccess().ExecuteSql(lStrInsert)); }
protected void Page_Load(object sender, EventArgs e) { if (Request.Params[FPSystemBiz.PARAM_RESULT] == null || IsPostBack) { return; } string lStrIDCard = StringHelper.fnFormatNullOrBlankString(Request.Params[FPSystemBiz.PARAM_RESULT], ""); if (lStrIDCard == "") { return; } FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(lStrIDCard); //lStrIDCard = Server.UrlDecode(lStrIDCard); //int lIntResultCode= FPSyst//////////emBiz.fnIdendityStudentLesson(lStrIDCard); bool isCheckin = false; DateTime lDtToday = DateTime.Now; if (fso == null) { this.lbStudentAlertMsg.Text = "学员个人信息不存在,可能是驾校未及时上传"; WebTools.PlaySound("../../sound/学员个人信息不存在.wav"); return; } else { ucStudentInfo.fnUILoadStudentRecord(fso); try { //int site_id = StringHelper.fnFormatNullOrBlankInt(Session["site_id"].ToString()); FpSite fpSite = Session[typeof(FpSite).Name] as FpSite; isCheckin = FPSystemBiz.fnStudentCheckIn(ref fso, fpSite, lDtToday); if (isCheckin) { if (fso.STATUE == FpStudentObject.STATUE_LESSON_END) { WebTools.PlaySound("../../sound/学员已完成上课.wav"); } else { WebTools.PlaySound("../../sound/上课考勤有效.wav"); } } else { WebTools.PlaySound("../../sound/上课考勤无效.wav"); } this.fnUILoadStudentRecord(fso, 0); } catch (Exception ex) { lbStudentAlertMsg.Text = ex.Message; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { foreach (int key in FpStudentObject.GetDictStatue().Keys) { string text = FpStudentObject.GetDictStatue()[key]; ddlStatue.Items.Add(new ListItem(text, key.ToString())); } } }
protected void btnAdd_Click(object sender, EventArgs e) { /* * ZwTpObject tp = new ZwTpObject(); * tp.Approver = "test"; * tp.ApproveTime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); * tp.IdCard = this.txtIdCardInput.Text.Trim(); * tp.Name = "testname"; * tp.School ="testschool"; * tp.Type = this.DropDownList1.Text; * ZwTpOperator.Create(tp); */ // TempStudentInfo info=DrvQueryHelper.QueryStudent(WholeWebConfig.Glbm, this.txtIdCard.Text.Trim()); FpStudentObject f = new FpStudentObject(); f.IDCARD = this.txtIdCardInput.Text; FpStudentObject info = SimpleOrmOperator.Query <FpStudentObject>(f.IDCARD); // if (info == null || info.name == null || info.name.Length == 0) if (info == null) { WebTools.Alert(this, "未找到该学员在本车管所报名的信息!"); return; } else { ZwTpObject tp = new ZwTpObject(); tp.Approver = this.Operator.OperatorName; tp.ApproveTime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); tp.IdCard = this.txtIdCardInput.Text.Trim(); tp.Name = info.NAME; //tp.School = info.jxmc; tp.Type = this.DropDownList1.SelectedItem.Text; ZwTpOperator.Create(tp); this.btnSearch_Click(null, null); info.STATUE = Convert.ToInt32(DropDownList1.SelectedValue); if (ZwTpOperator.Update(info) == true) { WebTools.Alert(this, "特批成功!"); return; } else { WebTools.Alert(this, "特批失败!"); return; } this.btnSearch_Click(null, null); } }
private static Boolean fnStundentUdpate(FpStudentObject fso) { string lStrInsert = "update fp_student set name='{1}',localtype={2},lsh='{3}' where idcard='{0}'"; lStrInsert = string.Format(lStrInsert, fso.IDCARD.Trim('\''), //0 fso.NAME, //1 fso.LOCALTYPE , fso.LSH ); return(FT.DAL.DataAccessFactory.GetDataAccess().ExecuteSql(lStrInsert)); }
protected void Page_Load(object sender, EventArgs e) { if (Request.Params[FPSystemBiz.PARAM_RESULT] == null) { return; } string lStrIDCard = StringHelper.fnFormatNullOrBlankString(Request.Params[FPSystemBiz.PARAM_RESULT], ""); if (lStrIDCard == "") { return; } //int lIntResultCode = FPSystemBiz.fnIdendityStudentTrain(lStrIDCard); FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(lStrIDCard); bool isCheckin = false; DateTime lDtToday = DateTime.Now; string bustype = "km"; if (Session["bustype"] != null) { bustype = Session["bustype"].ToString(); } if (fso == null) { this.lbStudentAlertMsg.Text = "学员个人信息不存在"; WebTools.PlaySound("../../sound/学员个人信息不存在.wav"); return; } else { ucStudentInfo.fnUILoadStudentRecord(fso); try { //int site_id = StringHelper.fnFormatNullOrBlankInt(Session["site_id"].ToString()); FpSite fpSite = Session[typeof(FpSite).Name] as FpSite; isCheckin = FPSystemBiz.fnStudentCheckIn(ref fso, fpSite, lDtToday); if (isCheckin) { WebTools.PlaySound("../../sound/考试入场考勤有效.wav"); } else { WebTools.PlaySound("../../sound/考试入场考勤无效.wav"); } this.fnUILoadStudentRecord(fso, 0); } catch (Exception ex) { lbStudentAlertMsg.Text = ex.Message; } } }
protected void btnAdd_Click(object sender, EventArgs e) { /* ZwTpObject tp = new ZwTpObject(); tp.Approver = "test"; tp.ApproveTime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); tp.IdCard = this.txtIdCardInput.Text.Trim(); tp.Name = "testname"; tp.School ="testschool"; tp.Type = this.DropDownList1.Text; ZwTpOperator.Create(tp); */ // TempStudentInfo info=DrvQueryHelper.QueryStudent(WholeWebConfig.Glbm, this.txtIdCard.Text.Trim()); FpStudentObject f=new FpStudentObject(); f.IDCARD=this.txtIdCardInput.Text; FpStudentObject info = SimpleOrmOperator.Query<FpStudentObject>(f.IDCARD); // if (info == null || info.name == null || info.name.Length == 0) if(info==null) { WebTools.Alert(this, "未找到该学员在本车管所报名的信息!"); return; } else { ZwTpObject tp = new ZwTpObject(); tp.Approver = this.Operator.OperatorName; tp.ApproveTime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); tp.IdCard = this.txtIdCardInput.Text.Trim(); tp.Name = info.NAME; //tp.School = info.jxmc; tp.Type = this.DropDownList1.SelectedItem.Text; ZwTpOperator.Create(tp); this.btnSearch_Click(null, null); info.STATUE =Convert.ToInt32 (DropDownList1.SelectedValue); if (ZwTpOperator.Update(info) == true) { WebTools.Alert(this, "特批成功!"); return; } else { WebTools.Alert(this, "特批失败!"); return; } this.btnSearch_Click(null, null); } }
//添加或修改一条学员记录 public static Boolean fnAddOrUpdateStudentRecord(FpStudentObject fso) { string idCard = StringHelper.fnFormatNullOrBlankString(fso.IDCARD,""); fso.NAME = StringHelper.fnFormatNullOrBlankString(fso.NAME,""); if (SimpleOrmOperator.Create(fso) || FPSystemBiz.fnStundentUdpate(fso)) { return true; } else { return false; } }
//添加或修改一条学员记录 public static Boolean fnAddOrUpdateStudentRecord(FpStudentObject fso) { string idCard = StringHelper.fnFormatNullOrBlankString(fso.IDCARD, ""); fso.NAME = StringHelper.fnFormatNullOrBlankString(fso.NAME, ""); if (SimpleOrmOperator.Create(fso) || FPSystemBiz.fnStundentUdpate(fso)) { return(true); } else { return(false); } }
protected void btnBatchClear_Click(object sender, EventArgs e) { IList <string> idcards = new List <string>(); int checkNum = 0; int reNum = 0; foreach (DataGridItem item in DataGrid1.Items) { CheckBox cb = (CheckBox)item.FindControl("cbIdCard"); if (cb.Checked) { idcards.Add(item.Cells[3].Text); checkNum++; } } if (checkNum == 0) { WebTools.Alert("没有记录被选中"); return; } foreach (string idcard in idcards) { FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(idcard); //fso.KM3_VERIFY = "Y"; //fso.FEE_VERIFY_DATE = DateTime.Now; // string idcard = fso.IDCARD.Trim('\''); fso.IDCARD = "'" + idcard + "'"; if (SimpleOrmOperator.Delete(fso)) { // fso.IDCARD = fso.IDCARD.Trim('\''); _FP.FpDeleteUser(idcard); if (fso.STATUE >= FpStudentObject.STATUE_KM3_ENTER) { fso.IDCARD = idcard; FpStudentCleared cleared = new FpStudentCleared(fso); SimpleOrmOperator.Create(cleared); } reNum++; } } WebTools.Alert(string.Format("删除结果:选中{0}条记录,{1}条成功删除", checkNum, reNum)); this.ProcedurePager1.Changed = true; txtQueryValue.Text = ""; txtQueryValue.Focus(); }
protected void btnSaveStudent_Click(object sender, EventArgs e) { string lStrIDCard = StringHelper.fnFormatNullOrBlankString(this.txtIDCard.Text, ""); if (lStrIDCard == "") { WebTools.Alert("身份证号码不能为空"); return; } else if ((lStrIDCard.Length == 15 || lStrIDCard.Length == 18)) { string re = IDCardHelper.Validate(lStrIDCard); if (re != string.Empty) { WebTools.Alert(re); return; } } else if (txtLsh.Text.Trim().Length < 13) { WebTools.Alert("受理号不能少于13位"); return; } FpStudentObject fso = new FpStudentObject(); fso.IDCARD = lStrIDCard; int localtype = StringHelper.fnFormatNullOrBlankInt(ddlLocaltype.SelectedValue); fso.LOCALTYPE = localtype; fso.NAME = txtName.Text; fso.STATUE = FpStudentObject.STATUE_NEW; fso.LSH = txtLsh.Text; fso.SCHOOL_CODE = ddlSchool.SelectedValue; fso.SCHOOL_NAME = ddlSchool.SelectedItem.Text; fso.CAR_TYPE = ddlCarType.SelectedValue; fso.CREATE_TIME = DateTime.Now; fso.LASTMODIFY_TIME = DateTime.Now; fso.BL_IND = cbBlInd.Checked ? "Y" : "N"; if (FPSystemBiz.fnAddOrUpdateStudentRecord(fso)) { fnUISaveStudentInfoSucess(true); } else { fnUISaveStudentInfoSucess(false); } }
protected void btnQuery_Click(object sender, EventArgs e) { // string idcard = StringHelper.fnFormatNullOrBlankString(txtIDCard.Text, ""); // if (idcard == "") // { // WebTools.Alert("请输入要查询的身份证号码"); // return; // } // FpStudentObject fso = SimpleOrmOperator.Query<FpStudentObject>(idcard); // if (fso ==null) { // WebTools.Alert("查询的身份证号码不存在"); // } // if (fso != null) // { // ViewState[typeof(FpStudentObject).Name] = fso; // fnUILoadStudentRecord(fso, 0); // ucStudentInfo.fnUILoadStudentRecord(fso); // } string queryText = ddlQueryType.SelectedItem.Text; string queryType = ddlQueryType.SelectedValue; string quserValue = txtIDCard.Text; string condition = string.Format("where {0} like '%{1}'", queryType, quserValue); if (string.IsNullOrEmpty(quserValue)) { WebTools.Alert("查询条件不能为空"); return; } ArrayList fsos = SimpleOrmOperator.QueryConditionList <FpStudentObject>(condition); if (fsos.Count == 1) { ViewState[typeof(FpStudentObject).Name] = fsos[0]; FpStudentObject fso = fsos[0] as FpStudentObject; fnUILoadStudentRecord(fso, 0); ucStudentInfo.fnUILoadStudentRecord(fso); txtIDCard.Text = string.Empty; } else if (fsos.Count == 0) { WebTools.Alert(string.Format("{0}为\"{1}\" 的学员不存在", queryText, quserValue)); } else if (fsos.Count > 1) { WebTools.Alert(string.Format("{0}为\"{1}\" 的学员存在多个,请使用证件号码查询", queryText, quserValue)); } }
private void fnUILoadStudentRecord(FpStudentObject fso, int lIntResultCode) { this.lbName.Text = fso.NAME; this.lbSex.Text = fso.SEX; this.lbIdCard.Text = fso.IDCARD; this.lbIDCardType.Text = "第二代身份证"; this.lbBrithday.Text = DateTimeHelper.fnIsNewDateTime(fso.BRITHDAY)?"":fso.BRITHDAY.ToString(); this.lbPhone.Text = fso.PHONE; this.lbAddress.Text = fso.ADDRESS; this.lbDrvSchool.Text = fso.DRV_SCHOOL; this.lbDocNum.Text = fso.DRV_DOCNUM; this.lbDrvType.Text = fso.DRV_TYPE; this.lbRemark.Text = fso.REMARK; this.lbAlertMsg.Text = "指纹验证成功"; this.lbAlertMsg.Visible = true; }
private void fnUILoadStudentRecord(FpStudentObject pFso, int pResultCode) { this.lbStrName.Text = pFso.NAME; this.lbStuIdCard.Text = pFso.IDCARD; this.lbStuTrainEnter1.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_1) ? "" : pFso.TRAIN_ENTER_1.ToString(); this.lbStuTrainLeave1.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_1) ? "" : pFso.TRAIN_LEAVE_1.ToString(); this.lbStuTrainEnter2.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_2) ? "" : pFso.TRAIN_ENTER_2.ToString(); this.lbStuTrainLeave2.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_2) ? "" : pFso.TRAIN_LEAVE_2.ToString(); this.lbStuTrainEnter3.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_3) ? "" : pFso.TRAIN_ENTER_3.ToString(); this.lbStuTrainLeave3.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_3) ? "" : pFso.TRAIN_LEAVE_3.ToString(); this.lbStuTrainEnter4.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_4) ? "" : pFso.TRAIN_ENTER_4.ToString(); this.lbStuTrainLeave4.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_4) ? "" : pFso.TRAIN_LEAVE_4.ToString(); this.lbStuTrainEnter5.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_5) ? "" : pFso.TRAIN_ENTER_5.ToString(); this.lbStuTrainLeave5.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_5) ? "" : pFso.TRAIN_LEAVE_5.ToString(); this.lbStuTrainEnter6.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_6) ? "" : pFso.TRAIN_ENTER_6.ToString(); this.lbStuTrainLeave6.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_6) ? "" : pFso.TRAIN_LEAVE_6.ToString(); this.lbStuTrainEnter7.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_7) ? "" : pFso.TRAIN_ENTER_7.ToString(); this.lbStuTrainLeave7.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_7) ? "" : pFso.TRAIN_LEAVE_7.ToString(); this.lbStuTrainEnter8.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_8) ? "" : pFso.TRAIN_ENTER_8.ToString(); this.lbStuTrainLeave8.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_8) ? "" : pFso.TRAIN_LEAVE_8.ToString(); // if (pResultCode == FPSystemBiz.LESSON_ENTER_1_FAILE) // { // this.lbStudentAlertMsg.Text = "本次上课与上次不在同一天进行,旧上课记录已被清空,请再次确认上课"; // } // else if (pResultCode == FPSystemBiz.LESSON_ENTER_2_FAILE) // { // this.lbStudentAlertMsg.Text = "下午上课确认失败"; // } // else if (pResultCode == FPSystemBiz.LESSON_LEAVE_2_FAILE) // { // this.lbStudentAlertMsg.Text = "下午离场确认失败"; // } }
private void fnUILoadStudentRecord(FpStudentObject fso ,TempStudentInfo tso) { if (fso == null) { this.lbAlertMsg.Visible = true; this.lbAlertMsg.Text = "没有该学员的指纹记录信息"; } else if (tso == null) { this.lbAlertMsg.Visible = true; this.lbAlertMsg.Text = "没有该学员的个人信息"; } else { //fso.fromTempStudentInfo(tso); try { this.lbName.Text = fso.NAME; // this.lbSex.Text = fso.SEX;/; this.lbIdCard.Text = fso.IDCARD; // this.imgPerson.ImageUrl = string.Format("~/ShowImage.aspx?idcardtype=A&idcard={0}", fso.IDCARD); // this.lbIDCardType.Text = "第二代身份证"; // this.lbBrithday.Text = DateTimeHelper.fnIsNewDateTime(fso.BRITHDAY) ? "" : fso.BRITHDAY.ToString(); // this.lbPhone.Text = fso.PHONE; // this.lbAddress.Text = fso.ADDRESS; // this.lbDrvSchool.Text = fso.DRV_SCHOOL; // this.lbDocNum.Text = fso.DRV_DOCNUM; // this.lbDrvType.Text = fso.DRV_TYPE; this.lbRemark.Text = fso.REMARK; this.lbAlertMsg.Text = ""; this.lbLsh.Text = fso.LSH; this.lbSchoolName.Text = fso.SCHOOL_NAME; this.lbStaute.Text = FpStudentObject.GetDictStatue()[fso.STATUE]; this.lbFeeStatue.Text = fso.FEE_STATUE == "Y" ? "是" : "否"; this.lbKm3Verify.Text = fso.KM3_VERIFY == "Y" ? "是" : "否"; this.lbCarType.Text = fso.CAR_TYPE; FpLocalType localType=SimpleOrmOperator.Query<FpLocalType>(fso.LOCALTYPE); this.lbLocalType.Text = localType == null ? "" : localType.NAME; } catch (NullReferenceException nre) { } } }
private void fnUILoadStudentRecord(FpStudentObject fso, TempStudentInfo tso) { if (fso == null) { this.lbAlertMsg.Visible = true; this.lbAlertMsg.Text = "没有该学员的指纹记录信息"; } else if (tso == null) { this.lbAlertMsg.Visible = true; this.lbAlertMsg.Text = "没有该学员的个人信息"; } else { //fso.fromTempStudentInfo(tso); try { this.lbName.Text = fso.NAME; // this.lbSex.Text = fso.SEX;/; this.lbIdCard.Text = fso.IDCARD; // this.imgPerson.ImageUrl = string.Format("~/ShowImage.aspx?idcardtype=A&idcard={0}", fso.IDCARD); // this.lbIDCardType.Text = "第二代身份证"; // this.lbBrithday.Text = DateTimeHelper.fnIsNewDateTime(fso.BRITHDAY) ? "" : fso.BRITHDAY.ToString(); // this.lbPhone.Text = fso.PHONE; // this.lbAddress.Text = fso.ADDRESS; // this.lbDrvSchool.Text = fso.DRV_SCHOOL; // this.lbDocNum.Text = fso.DRV_DOCNUM; // this.lbDrvType.Text = fso.DRV_TYPE; this.lbRemark.Text = fso.REMARK; this.lbAlertMsg.Text = ""; this.lbLsh.Text = fso.LSH; this.lbSchoolName.Text = fso.SCHOOL_NAME; this.lbStaute.Text = FpStudentObject.GetDictStatue()[fso.STATUE]; this.lbFeeStatue.Text = fso.FEE_STATUE == "Y" ? "是" : "否"; this.lbKm3Verify.Text = fso.KM3_VERIFY == "Y" ? "是" : "否"; this.lbCarType.Text = fso.CAR_TYPE; FpLocalType localType = SimpleOrmOperator.Query <FpLocalType>(fso.LOCALTYPE); this.lbLocalType.Text = localType == null ? "" : localType.NAME; } catch (NullReferenceException nre) { } } }
/// <summary> /// Process user action after operation fingerprint /// Notice: if don't process user operation fingerprint then use the TrustLinkGereralControler achieve the Result /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void TrustLink_OperDlgPostEvent(object sender, EventArgs e) { ResultCodeArgs re = (ResultCodeArgs)e; string[] lArrUserIds = FpBase.getUserIds(re); FpStudentObject lObjStudent = null; int lIntAction = ACTION_NONE; if (Session[ACTION_NAME] == null) { return; } try { lIntAction = int.Parse(Session[ACTION_NAME].ToString()); } catch (Exception ex) { lIntAction = ACTION_NONE; } switch (lIntAction) { case ACTION_NONE: break; case ACTION_NEW_ENROLL_STUDENT: string qIDCard = this.txtIDCard.Text; lObjStudent = FT.DAL.Orm.SimpleOrmOperator.Query <FpStudentObject>(qIDCard); if (lObjStudent == null) { this.fnUINewEnrollStudentSucess(false); return; } else { lObjStudent.STATUE = FpStudentObject.STATUE_COLLECT; //FPSystemBiz.fnAddOrUpdateStudentRecord(lObjStudent); this.fnUINewEnrollStudentSucess(SimpleOrmOperator.Update(lObjStudent)); } break; } }
protected void btnBatchVerify_Click(object sender, EventArgs e) { IList <string> idcards = new List <string>(); int checkNum = 0; int reNum = 0; foreach (DataGridItem item in DataGrid1.Items) { CheckBox cb = (CheckBox)item.FindControl("cbIdCard"); if (cb.Checked) { idcards.Add(item.Cells[3].Text); checkNum++; } } if (checkNum == 0) { WebTools.Alert("没有记录被选中"); return; } // WebTools.Confirm(string.Format("是否审核选中的{0}条记录?",checkNum)); foreach (string idcard in idcards) { FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(idcard); fso.FEE_STATUE = "Y"; fso.FEE_VERIFY_DATE = DateTime.Now; if (SimpleOrmOperator.Update(fso)) { reNum++; } } WebTools.Alert(string.Format("审核结果:选中{0}条记录,{1}条成功通过审核", checkNum, reNum)); this.ProcedurePager1.Changed = true; txtQueryValue.Text = ""; txtQueryValue.Focus(); }
protected void Page_Load(object sender, EventArgs e) { if (Request.Params[FPSystemBiz.PARAM_RESULT] == null) { return; } string lStrIDCard = Request.Params[FPSystemBiz.PARAM_RESULT].ToString(); if (lStrIDCard.Length < 1) { return; } int lIntResultCode = FPSystemBiz.fnIdendityStudentLesson(lStrIDCard); FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(lStrIDCard); if (fso == null) { this.lbAlertMsg.Text = "没有该学员的个人信息"; return; } this.fnUILoadStudentRecord(fso, lIntResultCode); }
protected void DataGrid1_ItemCommand1(object source, DataGridCommandEventArgs e) { if (e.CommandName == "Verify") { string idcard = e.CommandArgument.ToString(); //ZwTpOperator.Delete(id); FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(idcard); fso.FEE_STATUE = "Y"; fso.FEE_VERIFY_DATE = DateTime.Now; if (SimpleOrmOperator.Update(fso)) { WebTools.Alert(this, string.Format("{0}:{1} 交费审核成功!", fso.LSH, fso.NAME)); } else { WebTools.Alert(this, string.Format("{0}:{1} 交费审核失败!", fso.LSH, fso.NAME)); } this.ProcedurePager1.Changed = true; } else if (e.CommandName == "DisVerify") { string idcard = e.CommandArgument.ToString(); //ZwTpOperator.Delete(id); FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(idcard); fso.FEE_STATUE = "N"; fso.FEE_VERIFY_DATE = default(DateTime); if (SimpleOrmOperator.Update(fso)) { WebTools.Alert(this, string.Format("{0}:{1} 交费取消审核成功!", fso.LSH, fso.NAME)); } else { WebTools.Alert(this, string.Format("{0}:{1} 交费取消审核失败!", fso.LSH, fso.NAME)); } this.ProcedurePager1.Changed = true; } }
protected void btnVerify_Click(object sender, EventArgs e) { string idcard = txtIdcard.Text.Trim(); if (!string.IsNullOrEmpty(idcard)) { FpStudentObject student = SimpleOrmOperator.Query <FpStudentObject>(idcard); if (student == null) { string gStrTargetFrame = Session["targetFrame"] as string; string gStrCheckinLogFrame = Session["checkinLogFrame"] as string; string lStrSearch = "", SCP_ALERT = ""; lStrSearch = string.Format("?{0}={1}", FPSystemBiz.PARAM_RESULT, ""); SCP_ALERT += string.Format("window.parent.document.frames('{0}').location.search='{1}';", gStrTargetFrame, lStrSearch); SCP_ALERT += string.Format("window.location.href='../FpHelper/FpVerify52_Idcard.aspx';", gStrCheckinLogFrame); WebTools.WriteScript(SCP_ALERT); } else { Response.Redirect("~/FpSystem/FpV52/finger_as_pwd.aspx?strfp=" + idcard); } } }
private static Boolean fnStudentDelete(FpStudentObject fso) { return true; }
public void fnUILoadStudentRecord(FpStudentObject fso) { fnUILoadStudentRecord(fso,new TempStudentInfo()); }
public static Boolean fnStudentCheckIn(ref FpStudentObject fso, FpSite fpSite, DateTime lDtCheckin) { bool isCheckin = false; //FpSite fpSite = SimpleOrmOperator.Query<FpSite>(site_id); string bustype = fpSite.BUSTYPE; int localType = fso.LOCALTYPE; if (fpSite.LIMIT > 0) { string condition = string.Format(" where SITE_ID={0} and BUSTYPE='{1}' and to_char(CHECKIN_DATE,'YYYY-MM-DD') = '{2}' order by CHECKIN_DATE DESC " , fpSite.ID , bustype , lDtCheckin ); int checkinCount = SimpleOrmOperator.QueryCounts<FpSite>(condition); if (checkinCount >= fpSite.LIMIT) { string fullMsg=string.Format("场地:{0} 今天的入场人数已超过{1},不能再入场",fpSite.NAME,fpSite.LIMIT); throw new Exception(fullMsg); } } FpLocalType fpLocalType=null; if (DictFpLocalTypes.ContainsKey(localType)) { fpLocalType = DictFpLocalTypes[localType]; } else { fpLocalType = SimpleOrmOperator.Query<FpLocalType>(localType); DictFpLocalTypes.Add(localType, fpLocalType); } isCheckin = fso.checkin(fpSite,fpLocalType,lDtCheckin); //fso.IDCARD="'"+fso.IDCARD+"'"; SimpleOrmOperator.Update(fso); fso.IDCARD = fso.IDCARD.Trim('\''); ; if (isCheckin) { FpCheckinLog log = new FpCheckinLog(); log.BUSTYPE = bustype; log.SITE_ID = fpSite.ID; log.CHECKIN_NAME = fso.NAME; log.CHECKIN_IDCARD = fso.IDCARD; log.CHECKIN_DATE = lDtCheckin; log.REMARK = fso.REMARK; log.CHECKIN_STATUE = fso.STATUE; int statue = fso.STATUE; if (statue == FpStudentObject.STATUE_KM1_ENTER) { log.REMARK = "科目1进场"; } else if (statue == FpStudentObject.STATUE_KM2_ENTER) { log.REMARK = "科目2进场"; } else if (statue == FpStudentObject.STATUE_KM1_ENTER) { log.REMARK = "科目3进场"; } else if (statue == FpStudentObject.STATUE_LESSON_START) { log.REMARK = "上课进场"; } else if (statue == FpStudentObject.STATUE_LESSON_END) { log.REMARK = "下课离场"; } isCheckin= SimpleOrmOperator.Create(log); } return isCheckin; }
public static bool Update(FpStudentObject fp) { return SimpleOrmOperator.Update(fp); }
private static Boolean fnStundentInsert(FpStudentObject fso) { string lStrInsert = "insert into fp_student (idcard,name) values ('{0}','{1}')"; lStrInsert = string.Format(lStrInsert, fso.IDCARD, //0 fso.NAME //1 ); return FT.DAL.DataAccessFactory.GetDataAccess().ExecuteSql(lStrInsert); }
public static Boolean fnRemoveStudentRecord(FpStudentObject fso) { return fnStudentDelete(fso); }
private void fnUILoadStudentRecord(FpStudentObject pFso, int pResultCode) { String sql=string.Format("select user_id,authen_info from enroll_temp where user_id='{0}'",pFso.IDCARD); DataTable fingerInfo = DataAccessFactory.GetDataAccess().SelectDataTable(sql, "enroll_temp"); if (fingerInfo == null || fingerInfo.Rows.Count < 1) { lbFingerInfo.Text = "指纹数据不存在"; } else { DataRow row = fingerInfo.Rows[0]; this.lbFingerInfo.Text = FpBase.getFingerCnName(row["authen_info"].ToString()); } this.lbStuLessonEnter1.Text = DateTimeHelper.fnIsNewDateTime(pFso.LESSON_ENTER_1) ? "" : pFso.LESSON_ENTER_1.ToString(); this.lbStuLessonLeave1.Text = DateTimeHelper.fnIsNewDateTime(pFso.LESSON_ENTER_1) ? "" : pFso.LESSON_LEAVE_1.ToString(); this.lbStuLessonEnter2.Text = DateTimeHelper.fnIsNewDateTime(pFso.LESSON_ENTER_2) ? "" : pFso.LESSON_ENTER_2.ToString(); this.lbStuLessonLeave2.Text = DateTimeHelper.fnIsNewDateTime(pFso.LESSON_LEAVE_2) ? "" : pFso.LESSON_LEAVE_2.ToString(); this.lbStuTrainEnter1.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_1) ? "" : pFso.TRAIN_ENTER_1.ToString(); this.lbStuTrainLeave1.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_1) ? "" : pFso.TRAIN_LEAVE_1.ToString(); this.lbStuTrainEnter2.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_2) ? "" : pFso.TRAIN_ENTER_2.ToString(); this.lbStuTrainLeave2.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_2) ? "" : pFso.TRAIN_LEAVE_2.ToString(); this.lbStuTrainEnter3.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_3) ? "" : pFso.TRAIN_ENTER_3.ToString(); this.lbStuTrainLeave3.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_3) ? "" : pFso.TRAIN_LEAVE_3.ToString(); this.lbStuTrainEnter4.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_4) ? "" : pFso.TRAIN_ENTER_4.ToString(); this.lbStuTrainLeave4.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_4) ? "" : pFso.TRAIN_LEAVE_4.ToString(); this.lbStuTrainEnter5.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_5) ? "" : pFso.TRAIN_ENTER_5.ToString(); this.lbStuTrainLeave5.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_5) ? "" : pFso.TRAIN_LEAVE_5.ToString(); this.lbStuTrainEnter6.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_6) ? "" : pFso.TRAIN_ENTER_6.ToString(); this.lbStuTrainLeave6.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_6) ? "" : pFso.TRAIN_LEAVE_6.ToString(); this.lbStuTrainEnter7.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_7) ? "" : pFso.TRAIN_ENTER_7.ToString(); this.lbStuTrainLeave7.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_7) ? "" : pFso.TRAIN_LEAVE_7.ToString(); this.lbStuTrainEnter8.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_ENTER_8) ? "" : pFso.TRAIN_ENTER_8.ToString(); this.lbStuTrainLeave8.Text = DateTimeHelper.fnIsNewDateTime(pFso.TRAIN_LEAVE_8) ? "" : pFso.TRAIN_LEAVE_8.ToString(); this.lbStuKm1Enter.Text = DateTimeHelper.fnIsNewDateTime(pFso.KM1_ENTER) ? "" : pFso.KM1_ENTER.ToString(); this.lbStuKm2Enter.Text = DateTimeHelper.fnIsNewDateTime(pFso.KM2_ENTER) ? "" : pFso.KM2_ENTER.ToString(); this.lbStuKm3Enter.Text = DateTimeHelper.fnIsNewDateTime(pFso.KM3_ENTER) ? "" : pFso.KM3_ENTER.ToString(); this.lbStr3in9Enter.Text = DateTimeHelper.fnIsNewDateTime(pFso.KM2_3IN9_ENTER) ? "" : pFso.KM2_3IN9_ENTER.ToString(); this.lbStudentAlertMsg.Text = pFso.REMARK; // if (pResultCode == FPSystemBiz.LESSON_ENTER_1_FAILE) // { // this.lbStudentAlertMsg.Text = "本次上课与上次不在同一天进行,旧上课记录已被清空,请再次确认上课"; // } // else if (pResultCode == FPSystemBiz.LESSON_ENTER_2_FAILE) // { // this.lbStudentAlertMsg.Text = "下午上课确认失败"; // } // else if (pResultCode == FPSystemBiz.LESSON_LEAVE_2_FAILE) // { // this.lbStudentAlertMsg.Text = "下午离场确认失败"; // } }
private static Boolean fnStundentUdpate(FpStudentObject fso) { string lStrInsert = "update fp_student set name='{1}',localtype={2},lsh='{3}' where idcard='{0}'"; lStrInsert = string.Format(lStrInsert, fso.IDCARD.Trim('\''), //0 fso.NAME, //1 fso.LOCALTYPE ,fso.LSH ); return FT.DAL.DataAccessFactory.GetDataAccess().ExecuteSql(lStrInsert); }