Exemple #1
0
        public Boolean Insert(TFcConditionStp facStpVo)
        {
            Boolean rtnVal = false;

            ISession ss = holder.CreateSession(typeof(TFcConditionStpDaoOracleImp));

            ITransaction tran = ss.BeginTransaction();

            try
            {
                facStpVo.CreateAndFlush();
                tran.Commit();
                rtnVal = true;
            }
            catch (Castle.ActiveRecord.Framework.ActiveRecordException ex)
            {
                tran.Rollback();
                throw new ApplicationException(ex.Message, ex);
            }
            catch (DbException ex)
            {
                tran.Rollback();
                throw new ApplicationException(ex.Message, ex);
            }
            finally
            {
                tran.Dispose();
                holder.ReleaseSession(ss);
            }

            return(rtnVal);
        }