private void btnAdd_Click(object sender, EventArgs e) { frm_crud = new C_rol_crud(); using (frm_role_crud crud_rol = frm_crud.formulario()) { desenfoque_abrir_formulario(); crud_rol.btnAcept.Click += new EventHandler(read_rol); crud_rol.ShowDialog(); overlayForm.Dispose(); } }
private void btnUpdate_Click(object sender, EventArgs e) { desenfoque_abrir_formulario(); if (e_rol.Clave != 0) { e_rol.Operacion = "update"; frm_crud = new C_rol_crud(e_rol); using (frm_role_crud crud_rol = frm_crud.formulario()) { crud_rol.btnAcept.Click += new EventHandler(read_rol); crud_rol.ShowDialog(); } } else { c_message.message("Selecciona un registro.", C_message.message_type.warning); } overlayForm.Dispose(); }