private void view_user() { DataTable dt; dUsers methods = new dUsers(); dt = methods.view(); dtgList.DataSource = dt; }
private void search_user(string search) { DataTable dt; dUsers methods = new dUsers(); dt = methods.search(search); dtgList.DataSource = dt; }
private void delete_user() { lUsers dt = new lUsers(); dUsers methods = new dUsers(); dt.idusarios = idUsuario; if (methods.delete(dt)) { MessageBox.Show("Usuario Eliminado", "Eliminacion Correcto"); pnlUser.Visible = false; pnlUser.Dock = DockStyle.None; } }
private void insertar_user() { lUsers dt = new lUsers(); dUsers methods = new dUsers(); dt.usuarios = txtUsuario.Text; dt.pass = txtPass.Text; MemoryStream ms = new MemoryStream(); pctIcono.Image.Save(ms, pctIcono.Image.RawFormat); dt.icono = ms.GetBuffer(); dt.estado = "ACTIVO"; if (methods.insert(dt)) { MessageBox.Show("Usuario Registrado", "Registro Correcto"); pnlUser.Visible = false; pnlUser.Dock = DockStyle.None; } }