Esempio n. 1
0
 public DataTable DevicesJson_Selecionar(int rowid)
 {
     try
     {
         DaDevices OjbDAO = new DaDevices();
         return(OjbDAO.DevicesJson_Selecionar(rowid));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 2
0
 public object Devices_Lista()
 {
     try
     {
         DaDevices OjbDAO = new DaDevices();
         return(OjbDAO.Devices_Lista());
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 3
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);
                }
            }
        }