public void ADD(BILLException item) { StringBuilder sb = new StringBuilder(); sb.Append("insert into EXCEPTIONS"); sb.Append("( innertel, title )"); sb.Append(" values "); sb.AppendFormat("( '{0}', '{1}' )", item.innertel, item.title); using (FirebirdDBHelper db = new FirebirdDBHelper(sb.ToString(), util.strDBConn)) { try { int count = db.GetEffectedCount(); } catch (FirebirdSql.Data.FirebirdClient.FbException fex) { db.Rollback(); util.WriteLog(string.Format("{0} ADD ERR : {1}", this.GetType(), fex.Message)); return; } } INIT(); }
public void REMOVE(BILLException item) { StringBuilder sb = new StringBuilder(); sb.AppendFormat("delete from EXCEPTIONS where innertel={0}", item.innertel); using (FirebirdDBHelper db = new FirebirdDBHelper(sb.ToString(), util.strDBConn)) { try { int count = db.GetEffectedCount(); } catch (FirebirdSql.Data.FirebirdClient.FbException fex) { db.Rollback(); util.WriteLog(string.Format("{0} REMOVE ERR : {1}", this.GetType(), fex.Message)); return; } } INIT(); }
public void MODIFY(BILLException item) { StringBuilder sb = new StringBuilder(); sb.Append("update EXCEPTIONS set"); sb.AppendFormat(" title='{0}' where innertel='{1}'", item.title, item.innertel); using (FirebirdDBHelper db = new FirebirdDBHelper(sb.ToString(), util.strDBConn)) { try { int count = db.GetEffectedCount(); } catch (FirebirdSql.Data.FirebirdClient.FbException fex) { db.Rollback(); util.WriteLog(string.Format("{0} MODIFY ERR : {1}", this.GetType(), fex.Message)); return; } } INIT(); }