private void DoBZClean(String bzTableName, BZ_COLS bzPM) { //代替标准的"作废"更新 if (IsBzZF(bzTableName, bzPM)) { try { dao.UpdateBZ_PM(bzPM); } catch { } } return; }
private bool IsBzZF(String bzTableName, BZ_COLS bzPM) { bool ret = false; if (null != bzPM.bdtbz && !"".Equals(bzPM.bdtbz)) { string bzwh = bzPM.bdtbz.Substring(bzPM.bdtbz.LastIndexOf(';') + 1); DateTime? ssrq = dao.GetSSRQ_ByBzwh(bzTableName, bzwh); if (null != ssrq && !"".Equals(ssrq)) { DateTime rq = (DateTime)ssrq; if (rq.CompareTo(DateTime.Now) <= 0) { bzPM.zf = true; return true; } } } return ret; }
/// <summary> /// 更新标准篇名信息 /// </summary> /// <param name="bzTableName"></param> /// <param name="bzCols"></param> /// <returns></returns> public bool UpdateBZ_PM(BZ_COLS bzCols) { Boolean flag = true; int back = sqlMapper.Update("UpdateBZ_PM", bzCols); if (back <= 0) { flag = false; } return flag; }