예제 #1
0
        public string Devices_Editar(EnDevices objEn)
        {
            string      msg       = string.Empty;
            ConexionDAO cadenaDao = new ConexionDAO();

            using (MySqlConnection cn = new MySqlConnection(cadenaDao.CnxMySQL()))
            {
                cn.Open();
                using (MySqlTransaction tran = cn.BeginTransaction())
                {
                    try
                    {
                        DaDevices OjbDAO = new DaDevices();
                        OjbDAO.Devices_Editar(objEn, tran);
                        tran.Commit();
                        msg = "EXITO";
                    }
                    catch (MySqlException ex)
                    {
                        tran.Rollback();
                        throw ex;
                    }
                    catch (Exception ex)
                    {
                        tran.Rollback();
                        throw ex;
                    }
                    finally
                    {
                        tran.Dispose();
                        cn.Close();
                    }
                    return(msg);
                }
            }
        }