{"id":1233,"date":"2007-02-02T09:56:00","date_gmt":"2007-02-02T09:56:00","guid":{"rendered":"http:\/\/karstieltopia.com\/2007\/02\/02\/que-pasa-en-las-deserciones\/"},"modified":"2007-02-02T09:56:00","modified_gmt":"2007-02-02T09:56:00","slug":"que-pasa-en-las-deserciones","status":"publish","type":"post","link":"http:\/\/karstieltopia.com\/trastero\/que-pasa-en-las-deserciones\/","title":{"rendered":"Qu\u00e9 pasa en las deserciones\u2026"},"content":{"rendered":"
Si ten\u00e9is curiosidad por saber como gestionan las deserciones en recursos humanos y amigos, aqu\u00ed ten\u00e9is el c\u00f3digo de ellos (gracias Ucedaman<\/a> :D)<\/p>\n Parte de la clase EmployeeDesertionListener<\/strong><\/em><\/p>\n<br><br>onDesertionEvent ()<br>{<br>if (employee.isUseful())<br>{<br>boolean acceptedOffer = false;<br>short max = nextEmployeeInHierarchy().getSalary();<br>short currentOffer = employee.getSalary() + 1;<br>while (!acceptedOffer && currentOffer <= max)<br>{<br>prompt ("\u00bfY si te pagamos " + currentOffer + "?");<br>if (employee.acceptsOffer ( currentOffer ))<br>{<br>acceptedOffer = true;<br>employee.setSalary ( currentOffer );<br>}<br>else<br>currentOffer++;<br>}<br>}<br>else<br>employee.door ();<br>}<br><\/pre>\n