예제 #1
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            Agregar agregar = new Agregar(usuario);

            agregar.Tag      = "I";
            agregar.TopLevel = false;
            agregar.Dock     = DockStyle.None;
            Controls.Add(agregar);
            agregar.Location = new Point(50, 50);
            agregar.BringToFront();
            agregar.FormClosed += new FormClosedEventHandler(A_FormClosed);
            agregar.Show();
        }
예제 #2
0
 private void tblUsuarios_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0)
     {
         Agregar agregar = new Agregar(new CEUsuario
         {
             id        = Convert.ToInt32(tblUsuarios.CurrentRow.Cells["ID"].Value.ToString()),
             userName  = tblUsuarios.CurrentRow.Cells["USU_USUARIO"].Value.ToString(),
             password  = tblUsuarios.CurrentRow.Cells["CLAVE"].Value.ToString(),
             nombres   = tblUsuarios.CurrentRow.Cells["NOMBRES"].Value.ToString(),
             correo    = tblUsuarios.CurrentRow.Cells["CORREO"].Value.ToString(),
             documento = tblUsuarios.CurrentRow.Cells["DOCUMENTO"].Value.ToString()
         });
         agregar.Tag      = "U";
         agregar.TopLevel = false;
         agregar.Dock     = DockStyle.None;
         Controls.Add(agregar);
         agregar.Location = new Point(50, 50);
         agregar.BringToFront();
         agregar.FormClosed += new FormClosedEventHandler(A_FormClosed);
         agregar.Show();
     }
 }