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); }
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); }
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); }
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); }
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); }