Пример #1
0
        public override bool changeState(int newState, int id)
        {
            clear();
            bool exito = false;

            try
            {
                dsGimnasioTableAdapters.socioTableAdapter ta = new dsGimnasioTableAdapters.socioTableAdapter();
                ta.cambiaEstado(newState, id);

                exito = true;
            }
            catch (Exception ex)
            {
                error.Add(ex.Message);
            }

            return(exito);
        }
Пример #2
0
        public override bool add()
        {
            clear();
            bool exito = false;

            try
            {
                dsGimnasioTableAdapters.socioTableAdapter ta = new dsGimnasioTableAdapters.socioTableAdapter();
                ta.add(Nombre, Paterno, Materno, Telefono, Observaciones, idUsuarioLog, foto);

                exito = true;
            }
            catch (Exception ex)
            {
                error.Add(ex.Message);
            }

            return(exito);
        }
Пример #3
0
        public override bool edit(int id)// Metodo que edita un registro
        {
            clear();
            bool exito = false;

            try
            {
                dsGimnasioTableAdapters.socioTableAdapter ta = new dsGimnasioTableAdapters.socioTableAdapter();
                ta.edit(Nombre, Paterno, Materno, Telefono, Observaciones, foto, id);

                exito = true;
            }
            catch (Exception ex)
            {
                error.Add(ex.Message);
            }

            return(exito);
        }
Пример #4
0
        public bool socioActivo(int id)
        {
            clear();
            bool exito = false;

            try
            {
                dsGimnasioTableAdapters.socioTableAdapter ta = new dsGimnasioTableAdapters.socioTableAdapter();
                dsGimnasio.socioDataTable dt = ta.GetDataById(id);
                if (dt.Rows.Count > 0)
                {
                    datos = (dsGimnasio.socioRow)dt.Rows[0];
                    exito = datos.idEstado == 2 ? false : true;
                }
            }
            catch (Exception ex)
            {
                error.Add(ex.Message);
            }

            return(exito);
        }
Пример #5
0
        public override bool getDatos(int id)// Metodo que llena datos
        {
            clear();
            bool exito = false;

            try//
            {
                dsGimnasioTableAdapters.socioTableAdapter ta = new dsGimnasioTableAdapters.socioTableAdapter();
                dsGimnasio.socioDataTable dt = ta.GetDataById(id);

                if (dt.Rows.Count > 0)
                {
                    datos = (dsGimnasio.socioRow)dt.Rows[0];
                    exito = true;
                }
            }
            catch (Exception ex)
            {
                error.Add(ex.Message);
            }

            return(exito);
        }