public void MODIFY(Firm item) { StringBuilder sb = new StringBuilder(); sb.AppendFormat("update FIRMS set title={0} where idx={1}", item.title, item.idx); 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(); }
public void ADD(Firm item) { StringBuilder sb = new StringBuilder(); sb.Append("insert into FIRMS"); sb.Append("( title )"); sb.Append(" values "); sb.AppendFormat("( {0} )", 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(); }