예제 #1
0
        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();
        }
예제 #2
0
        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();
        }
예제 #3
0
        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();
        }
예제 #4
0
        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();
        }
예제 #5
0
        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();
        }
예제 #6
0
        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();
        }