Esempio n. 1
0
        public override bool getDatos(System.Windows.Forms.DataGridView dgv)
        {
            clear();
            bool exito = false;

            try
            {
                dsGimnasioTableAdapters.vwsociosTableAdapter ta = new dsGimnasioTableAdapters.vwsociosTableAdapter();
                dsGimnasio.vwsociosDataTable dt = ta.GetData();
                dgv.DataSource = dt;
                exito          = true;
            }
            catch (Exception ex)
            {
                error.Add(ex.Message);
            }

            return(exito);
        }
Esempio n. 2
0
        public int idUsuarioLog     = 0;                                     // Variable del tipo entero  inicializada

        public override bool getDatos(System.Windows.Forms.DataGridView dgv) // Metodo que obtiene datos del DataGridView
        {
            clear();                                                         // Limpia atributos
            bool exito = false;

            try
            {
                dsGimnasioTableAdapters.vwsociosTableAdapter ta = new dsGimnasioTableAdapters.vwsociosTableAdapter();
                dsGimnasio.vwsociosDataTable dt = ta.GetData();
                dgv.DataSource = dt;// Asignamos data source  a dt
                exito          = true;
            }
            catch (Exception ex)       // Excepción del tipo ex
            {
                error.Add(ex.Message); // mensaje de error
            }

            return(exito);// retornamos
        }