Exemplo n.º 1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            Rol rolToCreate = new Rol();

            rolToCreate.description = "";
            rolToCreate.id          = 0;
            FormABMRolModify formABMRolModify = new FormABMRolModify(false, rolToCreate);

            formABMRolModify.MdiParent = this.MdiParent;
            MdiParent.Size             = formABMRolModify.Size;
            formABMRolModify.Show();
            this.Close();
        }
Exemplo n.º 2
0
 private void buttonEdit_Click(object sender, EventArgs e)
 {
     if (dvgRol.CurrentRow != null)
     {
         Rol rolToModify = new Rol();
         rolToModify.id          = Convert.ToInt32(dvgRol.CurrentRow.Cells[0].Value.ToString());
         rolToModify.description = dvgRol.CurrentRow.Cells[1].Value.ToString();
         FormABMRolModify formABMRolModify = new FormABMRolModify(true, rolToModify);
         formABMRolModify.MdiParent = this.MdiParent;
         MdiParent.Size             = formABMRolModify.Size;
         formABMRolModify.Show();
         this.Close();
     }
     else
     {
         MessageBox.Show("Debe seleccionar un rol a modificar");
     }
 }