/// <summary> /// 新增或修改证书复审记录 /// </summary> /// <param name="entity"></param> /// <returns></returns> public bool SaveCertAudit(CertAuditEntity entity) { try { var db = DbFactory.Base(); if (string.IsNullOrWhiteSpace(entity.Id)) { entity.Create(); db.Insert <CertAuditEntity>(entity); } else { CertAuditEntity ca = db.FindEntity <CertAuditEntity>(entity.Id); if (ca == null) { entity.Create(); DbFactory.Base().Insert <CertAuditEntity>(entity); } else { DbFactory.Base().Update <CertAuditEntity>(entity); } } return(true); } catch { return(false); } }
/// <summary> /// 删除证书复审记录 /// </summary> /// <param name="keyValue"></param> /// <returns></returns> public bool RemoveCertAudit(string keyValue) { try { var db = DbFactory.Base(); CertAuditEntity ca = db.FindEntity <CertAuditEntity>(keyValue); if (ca != null) { db.Delete <CertAuditEntity>(keyValue); return(true); } else { return(false); } } catch { return(false); } }
/// <summary> /// 新增或修改证书复审记录 /// </summary> /// <param name="entity"></param> /// <returns></returns> public bool SaveCertAudit(CertAuditEntity entity) { return(service.SaveCertAudit(entity)); }