Esempio n. 1
0
        public virtual bool UpdateSecPageDomain(SecPageDomain domain)
        {
            using (DataAccessBroker broker = DataAccessFactory.Instance())
            {
                broker.BeginTransaction();
                try
                {
                    // 具体业务逻辑

                    broker.Commit();
                    return true;
                }
                catch
                {
                    broker.RollBack();
                    return false;
                }
            }
        }
Esempio n. 2
0
        public virtual bool InsertSecPageDomain(SecPageDomain domain)
        {
            using (DataAccessBroker broker = DataAccessFactory.Instance())
            {
                broker.BeginTransaction();
                try
                {
                    // 具体业务逻辑
                    InsertSecPageEntity(domain.masterEntity, broker);

                    broker.Commit();
                    return true;
                }
                catch
                {
                    broker.RollBack();
                    return false;
                }
            }
        }