Exemplo n.º 1
0
        /// <summary>
        /// Realiza o insert do objeto por stored Procedure
        /// </summary>
        /// <param name="pObject">Objeto com os valores a ser inserido</param>
        /// <returns>Objeto Inserido</returns>
        public Responsavel Insert(Responsavel pObject)
        {
            ResponsavelDAO.BeginTransaction();
            try
            {
                Responsavel ResponsavelAux = ResponsavelDAO.InsertByStoredProcedure(pObject);
                pObject.idResponsavel = ResponsavelAux.idResponsavel;

                ResponsavelDAO.CommitTransaction();
            }
            catch (Exception ex)
            {
                ResponsavelDAO.RollbackTransaction();
                throw ex;
            }
            return(pObject);
        }