Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <remarks></remarks>
        /// <param name="dt"></param>
        /// <returns></returns>
        public Boolean GrabarMovimientoAtencion(DataTable dt)
        {
            string Conn = System.Configuration.ConfigurationManager.ConnectionStrings["database"].ToString();

            SqlConnection  CnnDS     = new SqlConnection();
            SqlTransaction TxOle     = null;
            string         Resultado = string.Empty;

            try
            {
                CnnDS.ConnectionString = Conn;
                CnnDS.Open();
                TxOle = CnnDS.BeginTransaction();

                Resultado = AtencionPeluqueriaDAO.GrabarMovimientoAtencion(dt, TxOle);

                TxOle.Commit();
                CnnDS.Close();
                return(Resultado != String.Empty);
            }
            catch
            {
                TxOle.Rollback();
                CnnDS.Close();
                throw;
            }
            finally
            {
                CnnDS = null;
                TxOle = null;
            }
        }