示例#1
0
        private void view_user()
        {
            DataTable dt;
            dUsers    methods = new dUsers();

            dt = methods.view();
            dtgList.DataSource = dt;
        }
示例#2
0
        private void search_user(string search)
        {
            DataTable dt;
            dUsers    methods = new dUsers();

            dt = methods.search(search);
            dtgList.DataSource = dt;
        }
示例#3
0
        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;
            }
        }
示例#4
0
        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;
            }
        }