Пример #1
0
        internal int Delete(Int32 ta212_idOrganizacionComercial)
        {
            Guid methodOwnerID = new Guid("6dc63cd8-3016-4146-9538-c08725a02366");

            OpenDbConn();

            if (cDblib.Transaction.ownerID.Equals(new Guid()))
            {
                cDblib.beginTransaction(methodOwnerID);
            }

            try
            {
                DAL.OrganizacionComercial cOrganizacionComercial = new DAL.OrganizacionComercial(cDblib);

                int result = cOrganizacionComercial.Delete(ta212_idOrganizacionComercial);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(result);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }