private void doWriteBeanToComponents(TPermohonan tPermohonan, TVerifikasi tVerifikasi) { textbox_TIdossPermohonanId.setValue(getPermohonanService().getPermohonanID()); textbox_NamaPemohon.setValue(getUserWorkspace().getUserSession().getEmployeeName()); textbox_BagianPemohon.setValue(getUserWorkspace().getUserSession().getDepartment()); tPermohonan = setBoss(tPermohonan, getUserWorkspace().getUserSession().getEmployeeNo()); textbox_NamaManager.setValue(tPermohonan.getNama_manager()); textbox_NamaGm.setValue(tPermohonan.getNama_gm()); textbox_NikPemohon.setValue(getUserWorkspace().getUserSession().getEmployeeNo()); textbox_NikManager.setValue(tPermohonan.getNik_manager()); textbox_NikGm.setValue(tPermohonan.getNik_gm()); Timestamp ts = new Timestamp(java.util.Calendar.getInstance().getTimeInMillis()); datebox_Tanggal.setValue(ts); // int indexPlks = 0; // ListModel listPlks = listbox_NamaPelaksana.getModel(); // for (int i = 0; i < listPlks.getSize(); i++) { // VHrEmployeePelaksana np = (VHrEmployeePelaksana) listPlks.getElementAt(i); // if (np.getEmployee_no().equals(tVerifikasi.getNik_pelaksana())) indexPlks = i; // } // listbox_NamaPelaksana.setSelectedIndex(indexPlks); }
private TPermohonan setNikNama(TPermohonan tPermohonan, String employeeNo) { VHrEmployee parentEmployee = getNamaVHrEmployee(employeeNo); if (parentEmployee.getJob_position_code().equals("Assistant Manager") || parentEmployee.getJob_position_code().equals("Analyst")) { // if (getUserWorkspace().getUserSession().getEmployeeRole().contains(1532)) { tPermohonan.setNik_asman(employeeNo); tPermohonan.setNama_asman(parentEmployee.getEmployee_name()); } else if (parentEmployee.getJob_position_code().equals("Manager") || parentEmployee.getJob_position_code().equals("POH Manager")) { // } else if // ((getUserWorkspace().getUserSession().getEmployeeRole().contains(1537))||(getUserWorkspace().getUserSession().getEmployeeRole().contains(1536))) { tPermohonan.setNik_manager(employeeNo); tPermohonan.setNama_manager(parentEmployee.getEmployee_name()); } else if (parentEmployee.getJob_position_code().equals("General Manager") || parentEmployee.getJob_position_code().equals("POH General Manager")) { // } else if // ((getUserWorkspace().getUserSession().getEmployeeRole().contains(1534))||(getUserWorkspace().getUserSession().getEmployeeRole().contains(1533))) { tPermohonan.setNik_gm(employeeNo); tPermohonan.setNama_gm(parentEmployee.getEmployee_name()); } return tPermohonan; }
private void doWriteComponentsToBean(TPermohonan tPermohonan, Mttr mttr) { // tPermohonan.setT_idoss_permohonan_id(textbox_TIdossPermohonanId.getValue()); tPermohonan.setNama_pemohon(textbox_NamaPemohon.getValue()); tPermohonan.setBagian_pemohon(textbox_BagianPemohon.getValue()); Timestamp ts = new Timestamp(java.util.Calendar.getInstance().getTimeInMillis()); tPermohonan.setTgl_permohonan(ts); tPermohonan.setNik_pemohon(textbox_NikPemohon.getValue()); tPermohonan.setNama_manager(textbox_NamaManager.getValue()); tPermohonan.setNik_manager(textbox_NikManager.getValue()); tPermohonan.setNama_gm(textbox_NamaGm.getValue()); tPermohonan.setNik_gm(textbox_NikGm.getValue()); tPermohonan.setDetail_permohonan(textbox_DetailPermohonan.getValue()); if (getUploadMedia() != null) { tPermohonan.setUploadStream(getUploadMedia().getStreamData()); } tPermohonan.setTarget_mulai_digunakan(ts); String lain = textbox_Lainlain.getValue(); tPermohonan.setLain_lain_desc(lain); // radio_lainlain.setValue(lain); Radio type = radiogroupType_permohonan.getSelectedItem(); tPermohonan.setType_permohonan(type.getValue()); tPermohonan.setLain_lain_desc(textbox_Lainlain.getValue()); tPermohonan.setUpdated_divisi(ts); tPermohonan.setUpdated_gm(ts); tPermohonan.setUpdated_manager(ts); tPermohonan.setUpdated_pemohon(ts); Radio dampak = radiogroup_Dampak.getSelectedItem(); tPermohonan.setDampak(dampak.getValue()); Radio prioritas = radiogroup_Prioritas.getSelectedItem(); tPermohonan.setUrgensi(prioritas.getValue()); tPermohonan.setCreated_user(getUserWorkspace().getUserSession().getUserName()); tPermohonan.setUpdated_user(getUserWorkspace().getUserSession().getUserName()); if (intbox_target.getValue() != null) { int target = intbox_target.getValue(); long too = setTarget(target); Timestamp tanggalnya = new Timestamp(too); mttr.setTarget(too); mttr.setTarget2(Integer.toString(target)); } }