From f6a27a5b3b93ca9c5afd68b1d7b6e3232a0f35c8 Mon Sep 17 00:00:00 2001 From: liffera17 Date: Sat, 3 Oct 2020 11:26:43 +0700 Subject: [PATCH 1/2] gavin-2020-event wkwkwk event 2020 --- .../controller/AdminController.java | 92 ++ .../controller/LoginController.java | 87 ++ .../controller/ManagerController.java | 109 ++ .../controller/OutletController.java | 50 + .../controller/PemesananController.java | 119 ++ .../controller/RekapAdminController.java | 62 + .../controller/RekapManagerController.java | 47 + .../controller/TambahAdminController.java | 43 + .../controller/TambahMenejerController.java | 131 ++ .../controller/TambahOutletController.java | 129 ++ src/tokomaterial/controller/c_awal.java | 59 + src/tokomaterial/controller/c_feedback.java | 85 + .../controller/c_feedbackAdmin.java | 100 ++ src/tokomaterial/controller/c_gambar.java | 37 + src/tokomaterial/controller/c_kontrak.java | 143 ++ src/tokomaterial/controller/c_kualitas.java | 1370 +++++++++++++++++ src/tokomaterial/controller/main.java | 36 + 17 files changed, 2699 insertions(+) create mode 100644 src/tokomaterial/controller/AdminController.java create mode 100644 src/tokomaterial/controller/LoginController.java create mode 100644 src/tokomaterial/controller/ManagerController.java create mode 100644 src/tokomaterial/controller/OutletController.java create mode 100644 src/tokomaterial/controller/PemesananController.java create mode 100644 src/tokomaterial/controller/RekapAdminController.java create mode 100644 src/tokomaterial/controller/RekapManagerController.java create mode 100644 src/tokomaterial/controller/TambahAdminController.java create mode 100644 src/tokomaterial/controller/TambahMenejerController.java create mode 100644 src/tokomaterial/controller/TambahOutletController.java create mode 100644 src/tokomaterial/controller/c_awal.java create mode 100644 src/tokomaterial/controller/c_feedback.java create mode 100644 src/tokomaterial/controller/c_feedbackAdmin.java create mode 100644 src/tokomaterial/controller/c_gambar.java create mode 100644 src/tokomaterial/controller/c_kontrak.java create mode 100644 src/tokomaterial/controller/c_kualitas.java create mode 100644 src/tokomaterial/controller/main.java diff --git a/src/tokomaterial/controller/AdminController.java b/src/tokomaterial/controller/AdminController.java new file mode 100644 index 0000000..5f25156 --- /dev/null +++ b/src/tokomaterial/controller/AdminController.java @@ -0,0 +1,92 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.SQLException; +import java.text.ParseException; +import java.util.logging.Level; +import java.util.logging.Logger; +import model.AdminModel; +import model.LoginModel; +import model.PemesananModel; +import view.HomeAdminView; +import view.LoginView; +import view.PemesananView; +import view.RekapPenjualanAdminView; +import model.RekapAdminModel; + +/** + * + * @author World + */ +public class AdminController { + + model.AdminModel theModel; + view.HomeAdminView theView; + + public AdminController(AdminModel theModel, HomeAdminView theView) { + this.theModel = theModel; + this.theView = theView; + + theView.pesanListener(new pesan()); + theView.rekapPesananListener(new rekapPenjualanAdmin()); + theView.logoutListener(new logout()); + + } + + private class logout implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + LoginView lg = new LoginView(); + theView.dispose(); + lg.setVisible(true); + LoginModel theModel = new LoginModel(); + LoginController theController = new LoginController(theModel, lg); + } catch (SQLException ex) { + Logger.getLogger(AdminController.class.getName()).log(Level.SEVERE, null, ex); + } + } + + } + + private class pesan implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + PemesananView a = new PemesananView(); + theView.dispose(); + a.setVisible(true); + PemesananModel theModel = new PemesananModel(); + PemesananController theController = new PemesananController(theModel, a); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + } + + private class rekapPenjualanAdmin implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + RekapPenjualanAdminView rp = new RekapPenjualanAdminView(); + theView.dispose(); + rp.setVisible(true); + RekapAdminModel theModel = new RekapAdminModel(); + RekapAdminController theController = new RekapAdminController(theModel, rp); + } catch (SQLException ex) { + Logger.getLogger(AdminController.class.getName()).log(Level.SEVERE, null, ex); + } + } + + } + +} diff --git a/src/tokomaterial/controller/LoginController.java b/src/tokomaterial/controller/LoginController.java new file mode 100644 index 0000000..812a9c8 --- /dev/null +++ b/src/tokomaterial/controller/LoginController.java @@ -0,0 +1,87 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JOptionPane; +import model.AdminModel; +import model.LoginModel; +import model.ManajerModel; +import view.HomeAdminView; +import view.LoginView; +import view.HomeManagerView; + +/** + * + * @author World + */ +public class LoginController { + + private model.LoginModel theModel; + private view.LoginView theView; + private static String username; + + public LoginController(LoginModel theModel, LoginView theView) throws SQLException { + this.theModel = theModel; + this.theView = theView; + + theView.setVisible(true); + theView.loginListener(new loginListener()); + } + + public static void setUserLogin(String username) { + LoginController.username = username; + } + + public static String getUserLogin() { + return username; + } + + private class loginListener implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + int result = theModel.login(theView.getTxtUsername(), theView.getPassword()); + + if (result == 1) { + int level = theModel.lvlLogin(theView.getTxtUsername(), theView.getPassword()); + + if (level == 2) { + //JOptionPane.showMessageDialog(viewLogin, "Halo " + username + " !"); + HomeManagerView m = new HomeManagerView(); + theView.dispose(); + m.setVisible(true); + ManajerModel modelManajer = new ManajerModel(); + ManagerController controlManajer = new ManagerController(modelManajer, m); + + } else if (level == 1) { + //JOptionPane.showMessageDialog(viewLogin, "Halo " + username + " !"); + HomeAdminView admin = new HomeAdminView(); + theView.dispose(); + admin.setVisible(true); + AdminModel modeladmin = new AdminModel(); + AdminController controller = new AdminController(modeladmin, admin); + } + + } else if ((theView.getTxtUsername().equalsIgnoreCase("") || theView.getPassword().equalsIgnoreCase(""))) { + JOptionPane.showMessageDialog(theView, "Username dan Password tidak Boleh Kosong"); + } else { + JOptionPane.showMessageDialog(theView, "USERNAME ATAU PASSWORD ANDA SALAH !"); + } + + } catch (SQLException ex) { + JOptionPane.showMessageDialog(theView, "Koneksi time out!"); + Logger.getLogger(LoginController.class.getName()).log(Level.SEVERE, null, ex); + } + + } + } +} diff --git a/src/tokomaterial/controller/ManagerController.java b/src/tokomaterial/controller/ManagerController.java new file mode 100644 index 0000000..76c0e99 --- /dev/null +++ b/src/tokomaterial/controller/ManagerController.java @@ -0,0 +1,109 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import model.*; +import view.*; + +/** + * + * @author World + */ +public class ManagerController { + + model.ManajerModel theModel; + view.HomeManagerView theView; +// model.RekapManagerModel Model; + + public ManagerController(ManajerModel theModel, HomeManagerView theView) { + this.theModel = theModel; + this.theView = theView; + + theView.logout(new logout()); + theView.admin(new admin()); + theView.outlet(new outlet()); + theView.rekapManager (new rekapPenjualanManager()); + + } + + private class logout implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + LoginView lg = new LoginView(); + theView.dispose(); + lg.setVisible(true); + LoginModel theModel = new LoginModel(); + LoginController theController = new LoginController(theModel, lg); + } catch (SQLException ex) { + Logger.getLogger(ManagerController.class.getName()).log(Level.SEVERE, null, ex); + } + } + + } + + private class admin implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + TambahAkunView a = new TambahAkunView(); + theView.dispose(); + a.setVisible(true); + TambahManajerModel theModel = new TambahManajerModel() { + + }; + TambahMenejerController theController = new TambahMenejerController(theModel, a); + } catch (SQLException ex) { + Logger.getLogger(ManagerController.class.getName()).log(Level.SEVERE, null, ex); + } + + } + } + + private class outlet implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + TambahOutletView a = new TambahOutletView(); + theView.dispose(); + a.setVisible(true); + TambahOutletModel theModel = new TambahOutletModel() { + + }; + TambahOutletController theController = new TambahOutletController(theModel, a); + } catch (SQLException ex) { + Logger.getLogger(ManagerController.class.getName()).log(Level.SEVERE, null, ex); + } + + } + } +// + private class rekapPenjualanManager implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + RekapPenjualanManagerView rpm = new RekapPenjualanManagerView(); + theView.dispose(); + rpm.setVisible(true); + RekapManagerModel Model = new RekapManagerModel(); + RekapManagerController theController = new RekapManagerController( Model, rpm); + } catch (SQLException ex) { + Logger.getLogger(ManagerController.class.getName()).log(Level.SEVERE, null, ex); + } + } + + } + +} diff --git a/src/tokomaterial/controller/OutletController.java b/src/tokomaterial/controller/OutletController.java new file mode 100644 index 0000000..0d3235c --- /dev/null +++ b/src/tokomaterial/controller/OutletController.java @@ -0,0 +1,50 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.SQLException; +import java.text.ParseException; +import java.util.ArrayList; +import model.*; +import view.*; + +/** + * + * @author World + */ +public class OutletController { + + model.OutletModel theModel; + view.TambahOutletView theView; + OutletModel om; + ArrayList listOutlet; + + OutletController(OutletModel theModel, TambahOutletView theView) throws SQLException, ParseException { + this.theModel = theModel; + this.theView = theView; + om = new OutletModel(); + listOutlet = om.getAllAdmin(); + this.theView.btnKembali(new OutletController.kembali()); + +// this.theView.addAdminList(listOutlet); + + } + + private class kembali implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + HomeManagerView a = new HomeManagerView(); + theView.dispose(); + a.setVisible(true); + ManajerModel theModel = new ManajerModel(); + ManagerController theController = new ManagerController(theModel, a); + } + + } +} diff --git a/src/tokomaterial/controller/PemesananController.java b/src/tokomaterial/controller/PemesananController.java new file mode 100644 index 0000000..58b4d10 --- /dev/null +++ b/src/tokomaterial/controller/PemesananController.java @@ -0,0 +1,119 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.SQLException; +import java.text.ParseException; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JOptionPane; +import javax.swing.table.DefaultTableModel; +import model.ItemTransaksi; +import model.Produk; +import model.ProdukModel; +import model.AdminModel; +import model.ManajerModel; +import model.PemesananModel; +import view.HomeAdminView; +import view.HomeManagerView; +import view.PemesananView; + +/** + * + * @author World + */ +public class PemesananController { + + model.PemesananModel theModel; + view.PemesananView theView; + String username; + ProdukModel pdao; + ArrayList listProduk; + + PemesananController(PemesananModel theModel, PemesananView theView) throws SQLException, ParseException { + this.theModel = theModel; + this.theView = theView; + pdao = new ProdukModel(); + listProduk = pdao.getAllProduk(); + //username = c_login.getUserLogin(); + this.theView.btnKembaliListener(new PemesananController.kembali()); + this.theView.addProdukList(listProduk); + this.theView.btnTambahListener(new TambahBarangListener()); + this.theView.btnHapusListener(new HapusBarangListener()); + this.theView.btnBayarSaveListener(new SaveListener()); + } + + public void clear() { + theView.setNamaPemesan(""); + //theView.set(""); + } + + class TambahBarangListener implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + Produk p = listProduk.get(theView.getProdukSelected()); + theView.addItem(p.getNamaProduk(), p.getIdProduk() + "", theView.getJumlah(), p.getHarga()); + theView.plusTotal(theView.getJumlah() * p.getHarga()); + } + } + + class HapusBarangListener implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + theView.minTotal(theView.getSelectedQty() * theView.getSelectedHarga()); + theView.hapusItem(theView.getRow()); + } + } + + class SaveListener implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + DefaultTableModel model = theView.getModel(); + ArrayList list = new ArrayList<>(); + + for (int i = 0; i < model.getRowCount(); i++) { + ItemTransaksi item = new ItemTransaksi(); + item.setHarga(Double.parseDouble(model.getValueAt(i, 2).toString())); + item.setIdProduk(Long.parseLong(model.getValueAt(i, 0).toString())); + item.setQty((int) Double.parseDouble(model.getValueAt(i, 3).toString())); + list.add(item); + } + try { + int bayar = Integer.parseInt(theView.getBayar()); + double total = Double.parseDouble(theView.getTotalBiaya()); + double kembalian = bayar - total; + if (kembalian < 0) { + JOptionPane.showMessageDialog(theView, "uang yang Anda bayarkan kurang " + kembalian); + } else { + theView.setKembalian(String.valueOf(kembalian)); + theModel.saveTransaksi(theView.getNamaPemesan(), list); + } + } catch (SQLException ex) { + ex.printStackTrace(); + } + } + + } + + private class kembali implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + HomeAdminView a = new HomeAdminView(); + theView.dispose(); + a.setVisible(true); + AdminModel theModel = new AdminModel(); + AdminController theController = new AdminController(theModel, a); + } + + } +} diff --git a/src/tokomaterial/controller/RekapAdminController.java b/src/tokomaterial/controller/RekapAdminController.java new file mode 100644 index 0000000..9eec5a2 --- /dev/null +++ b/src/tokomaterial/controller/RekapAdminController.java @@ -0,0 +1,62 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import model.*; +import view.*; + +/** + * + * @author World + */ +public class RekapAdminController { + + model.RekapAdminModel theModel; + view.RekapPenjualanAdminView theView; + + RekapAdminController(RekapAdminModel theModel, RekapPenjualanAdminView theView) throws SQLException { + this.theModel = theModel; + this.theView = theView; + theView.btnHomeAdmin(new homeAdmin()); + theView.setTabel(theModel.getTableModel()); + + } + + private class homeAdmin implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + HomeAdminView ha = new HomeAdminView(); + theView.dispose(); + ha.setVisible(true); + AdminModel theModel = new AdminModel(); + AdminController theController = new AdminController(theModel, ha); + + } + + } + +// private class rekapPenjualan implements ActionListener { +// +// @Override +// public void actionPerformed(ActionEvent e) { +// try { +// RekapPenjualanAdminView a = new RekapPenjualanAdminView(); +// theView.dispose(); +// a.setVisible(true); +// RekapPenjualanAdminView theModel = new RekapPenjualanAdminView(); +// RekapAdminController theController = new RekapAdminController(theModel, a); +// } catch (Exception ex) { +// ex.printStackTrace(); +// } +// } +// } +} diff --git a/src/tokomaterial/controller/RekapManagerController.java b/src/tokomaterial/controller/RekapManagerController.java new file mode 100644 index 0000000..a62828b --- /dev/null +++ b/src/tokomaterial/controller/RekapManagerController.java @@ -0,0 +1,47 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import model.*; +import view.*; + +/** + * + * @author World + */ +public class RekapManagerController { + + model.RekapManagerModel theModel; + view.RekapPenjualanManagerView theView; + + RekapManagerController(RekapManagerModel theModel, RekapPenjualanManagerView theView) throws SQLException { + this.theModel = theModel; + this.theView = theView; + theView.btnHomeManager(new homeManager()); + theView.setTabel(theModel.getTableModel()); + + } + + private class homeManager implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + HomeManagerView hm = new HomeManagerView(); + theView.dispose(); + hm.setVisible(true); + ManajerModel theModel = new ManajerModel(); + ManagerController theController = new ManagerController(theModel, hm); + + } + + } + +} diff --git a/src/tokomaterial/controller/TambahAdminController.java b/src/tokomaterial/controller/TambahAdminController.java new file mode 100644 index 0000000..df93f49 --- /dev/null +++ b/src/tokomaterial/controller/TambahAdminController.java @@ -0,0 +1,43 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +//package controller; +// +//import java.awt.event.ActionEvent; +//import java.awt.event.ActionListener; +//import java.sql.SQLException; +//import java.util.logging.Level; +//import java.util.logging.Logger; +//import model.m_tambahAdmin; +//import view.TambahAdminView; + +/** + * + * @author World + */ +//public class c_tambahAdmin { +// model.m_tambahAdmin theModel; +// view.TambahAdminView theView; +// +//c_tambahAdmin(m_tambahAdmin theModel, TambahAdminView theView) throws SQLException{ +// this.theModel = theModel; +// this.theView = theView; +// +// +// +//} +//private class tambah implements ActionListener{ +// @Override +// public void actionPerformed(ActionEvent e){ +// try{ +// theModel.save("'"+ theView.namaNew()+"','"+theView.alamatNew()+"','"+theView.passNew()+"','"+theView.getStatus()+"',default"+""); +// }catch (SQLException ex){ +// Logger.getLogger(c_tambahAdmin.class.getName()).log(Level.SEVERE,null,ex); +// } +// } +//} +// +// +//} diff --git a/src/tokomaterial/controller/TambahMenejerController.java b/src/tokomaterial/controller/TambahMenejerController.java new file mode 100644 index 0000000..e635703 --- /dev/null +++ b/src/tokomaterial/controller/TambahMenejerController.java @@ -0,0 +1,131 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import model.ManajerModel; +import model.TambahManajerModel; +import view.HomeManagerView; +import view.TambahAkunView; + +/** + * + * @author World + */ +public class TambahMenejerController { + + model.TambahManajerModel theModel; + view.TambahAkunView theView; + + public TambahMenejerController(TambahManajerModel theModel, TambahAkunView theView) throws SQLException { + this.theModel = theModel; + this.theView = theView; + + theView.btnEdit(false); + theView.btnEditListener(new edit()); + + theView.btnPilihListener(new pilih()); + theView.btnKembaliListener(new kembali()); + theView.btnTambahListener(new tambah()); + theView.setTabel(theModel.getTableModel()); + theView.btnTambah(true); + + } + + private class tambah implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + System.out.println(theView.getUsername()); + System.out.println(theView.getPassword()); + System.out.println(theView.getAlamat()); + System.out.println(theView.getLevel()); + System.out.println(theView.getIdAkun()); + + theModel.save("default , '" + theView.getUsername() + "','" + theView.getPassword() + "','" + theView.getAlamat() +"','" + theView.getLevel()+ "'" + ""); + theView.setTabel(theModel.getTableModel()); + clear(); + } catch (SQLException ex) { + Logger.getLogger(TambahMenejerController.class.getName()).log(Level.SEVERE, null, ex); + } + } + + } + + private class edit implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + int baris = theView.getSelectedRow(); + String id = theView.getIdAkun(); + String username = theView.getUsername(); + String password = theView.getPassword(); + String alamat = theView.getAlamat(); + theModel.update("username = '" + username + "',password = '" + password + "',alamat = '" + alamat + "',level=1 where id_akun = " + id); + theView.setTabel(theModel.getTableModel()); + clear(); + theView.btnEdit(false); + theView.btnTambah(true); + } catch (SQLException ex) { + Logger.getLogger(TambahMenejerController.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + + public void clear() { + theView.setUsername(""); + theView.setPassword(""); + theView.setAlamat(""); + theView.setIdAkun(""); + theView.setLevel(""); + } + + private class pilih implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + int baris = theView.getSelectedRow(); + if (baris != -1) { + + String id = theView.getValueAt(baris, 0); + String username = theView.getValueAt(baris, 1); + String password = theView.getValueAt(baris, 2); + String level = theView.getValueAt(baris, 3); + String alamat = theView.getValueAt(baris, 4); + + theView.setUsername(username); + theView.setPassword(password); + theView.setIdAkun(id); + theView.setAlamat(alamat); + theView.setLevel(level); + + theView.btnEdit(true); + theView.btnTambah(false); + } + } + + } + + private class kembali implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + HomeManagerView m = new HomeManagerView(); + theView.dispose(); + m.setVisible(true); + ManajerModel theModel = new ManajerModel(); + ManagerController theController = new ManagerController(theModel, m); + } + + } + +} diff --git a/src/tokomaterial/controller/TambahOutletController.java b/src/tokomaterial/controller/TambahOutletController.java new file mode 100644 index 0000000..5707148 --- /dev/null +++ b/src/tokomaterial/controller/TambahOutletController.java @@ -0,0 +1,129 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import model.*; +import view.*; + +/** + * + * @author World + */ +public class TambahOutletController { + + model.TambahOutletModel theModel; + view.TambahOutletView theView; + ArrayList adminOutlet; + + public TambahOutletController(TambahOutletModel theModel, TambahOutletView theView) throws SQLException { + this.theModel = theModel; + this.theView = theView; + + theView.btnEdit(false); + theView.btnEditListener(new edit()); +// this.theView.addAdminList(adminOutlet); + + theView.btnPilihListener(new TambahOutletController.pilih()); + theView.btnKembali(new TambahOutletController.kembali()); + theView.btnTambahOutlet(new TambahOutletController.tambah()); + theView.setTabel(theModel.getTableModel()); + theView.btnTambah(true); + + } + + private class tambah implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + System.out.println(theView.getNamaOutlet()); + System.out.println(theView.getAlamatOutlet()); + System.out.println(theView.getAdminOutlet()); + + // System.out.println(theView.getIdAkun()); + theModel.save("default , '" + theView.getNamaOutlet() + "','" + theView.getAlamatOutlet() + "','"+theView.getAdminOutlet()+"'" + ""); + theView.setTabel(theModel.getTableModel()); + clear(); + } catch (SQLException ex) { + Logger.getLogger(TambahMenejerController.class.getName()).log(Level.SEVERE, null, ex); + } + } + + } + + private class edit implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + int baris = theView.getSelectedRow(); + String id = theView.getIdOutlet(); + String idAkun = theView.getIdAkun(); + String namaOutlet = theView.getNamaOutlet(); + String alamatOutlet = theView.getAlamatOutlet(); + System.out.println(id+"\n"+idAkun+"\n"+namaOutlet+"\n"+alamatOutlet); +// String adminOutlet = theView.getAdminOutlet(); +// String admin = theView.getListAdmin(); + theModel.update("id_outlet = '" + id + "',id_akun = '" + idAkun + "',nama_outlet = '" + namaOutlet + "',alamat_outlet = '"+alamatOutlet+"' where id_outlet = " + id); +// System.out.println(theModel.up); + theView.setTabel(theModel.getTableModel()); + clear(); + theView.btnEdit(false); + theView.btnTambah(true); + } catch (SQLException ex) { + Logger.getLogger(TambahMenejerController.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + + public void clear() { + theView.setNamaOutlet(""); + theView.setAlamatOutlet(""); + } + + private class pilih implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + int baris = theView.getSelectedRow(); + if (baris != -1) { + + String id = theView.getValueAt(baris, 0); + String namaOutlet = theView.getValueAt(baris, 2); + String alamatOutlet = theView.getValueAt(baris, 3); + String admin = theView.getValueAt(baris, 1); + + theView.setNamaOutlet(namaOutlet); + theView.setAlamatOutlet(alamatOutlet); + theView.setAdminOutlet(admin); + theView.setIdOutlet(id); + + theView.btnEdit(true); + theView.btnTambah(false); + } + } + + } + + private class kembali implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + HomeManagerView m = new HomeManagerView(); + theView.dispose(); + m.setVisible(true); + ManajerModel theModel = new ManajerModel(); + ManagerController theController = new ManagerController(theModel, m); + } + + } +} diff --git a/src/tokomaterial/controller/c_awal.java b/src/tokomaterial/controller/c_awal.java new file mode 100644 index 0000000..6df2692 --- /dev/null +++ b/src/tokomaterial/controller/c_awal.java @@ -0,0 +1,59 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JOptionPane; +import model.m_user; +import view.homeAwal; +import view.login; + +/** + * + * @author Vin + */ +public class c_awal { + + homeAwal theView; + + public c_awal(homeAwal theView) { + this.theView = theView; + theView.setVisible(true); + this.theView.klikLogin(new v_login()); + this.theView.klikAbout(new v_about()); + } + + private class v_login implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + theView.dispose(); + try { + c_user con = new c_user(new login(), new m_user()); + theView.dispose(); + } catch (SQLException ex) { + Logger.getLogger(c_awal.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + + private class v_about implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + JOptionPane.showMessageDialog(theView, "Project dari mata kuliah PPL Agro yang mengharuskan mahasiswa untuk membuat suatu program\n" + + "yang di dalamnya mencakup materi agroindustri yang mana sistem ini membantu agroindustri,\nsehingga membantu untuk memperoleh hasil agroindustri yang terbaik.\n" + + "Kelompok Kami antara lain : \n" + "1. Ayu Sisca Irianti 152410101053\n" + "2. Siti Vika NF 152410101072\n" + + "3. Gavin Liffera Kusuma P 152410101096\n" + "4. Aisyah Nur F 152410101097"); + } + + } + +} diff --git a/src/tokomaterial/controller/c_feedback.java b/src/tokomaterial/controller/c_feedback.java new file mode 100644 index 0000000..08e2333 --- /dev/null +++ b/src/tokomaterial/controller/c_feedback.java @@ -0,0 +1,85 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +import java.awt.Component; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JTextField; +import model.m_feedback; +import model.m_user; +import view.feedbackPenyakit; +import view.homePetani; + +/** + * + * @author Vin + */ +public class c_feedback { + + feedbackPenyakit view; + m_feedback model; + + public c_feedback(feedbackPenyakit view, m_feedback model) throws SQLException { + this.model = model; + this.view = view; + view.setVisible(true); + view.addSubmitListener(new saveListener()); + view.addBackListener(new backListener()); + view.setTable(model.getTableModel()); + } + + private class saveListener implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + + if (view.getPenyakit().isEmpty() || view.getVaksin().isEmpty()) { + JOptionPane.showMessageDialog(view, "Isi dengan benar!!"); + } else { + model.save("'" + view.getPenyakit() + "','" + view.getVaksin() + "', 'Tidak Disetujui'"); + view.setTable(model.getTableModel()); +// view.setPetani(""); +// view.setLuas(""); + view.setPenyakit(""); + view.setVaksin(""); + view.text(true); + view.buttonsave(true); + view.button(true); + } + } catch (SQLException ex) { + Logger.getLogger(c_feedback.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + + private class backListener implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + homePetani a = new homePetani(); + a.setVisible(true); + + try { + c_menuPetani theController = new c_menuPetani(a, new m_user()); + } catch (SQLException ex) { + Logger.getLogger(c_user.class.getName()).log(Level.SEVERE, null, ex); + } + System.out.println("oke"); + view.dispose(); + + } + + } + +} diff --git a/src/tokomaterial/controller/c_feedbackAdmin.java b/src/tokomaterial/controller/c_feedbackAdmin.java new file mode 100644 index 0000000..557124f --- /dev/null +++ b/src/tokomaterial/controller/c_feedbackAdmin.java @@ -0,0 +1,100 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +import java.awt.Component; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JTextField; +import model.m_feedback; +import model.m_user; +import view.feedbackAdmin; +import view.homeAdmin; + +/** + * + * @author Vin + */ +public class c_feedbackAdmin { + + m_feedback model; + feedbackAdmin view; + + public c_feedbackAdmin(feedbackAdmin view, m_feedback model) throws SQLException { + this.model = model; + this.view = view; + view.setVisible(true); + view.addSetujuListener(new setujuListener()); + view.addBackListener(new backListener()); + view.addTolakListener(new tolakListener()); + view.setTable(model.getTablePenyakit()); + } + + private class setujuListener implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + if (view.getTb_penyakit().getSelectedRow() == -1) { + JOptionPane.showMessageDialog(view, "Pilih Data Terlebih Dahulu"); + } else { + try { + model.update("status_penyakit='Disetujui' where id_penyakit=" + (String) view.getTb_penyakit().getValueAt(view.getTb_penyakit().getSelectedRow(), 0)); + view.buttonsetuju(true); + view.button(true); + view.setTable(model.getTablePenyakit()); + } catch (SQLException ex) { + Logger.getLogger(c_feedbackAdmin.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + + } + + private class backListener implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + homeAdmin a = new homeAdmin(); + a.setVisible(true); + + try { + c_menuAdmin theController = new c_menuAdmin(a, new m_user()); + } catch (SQLException ex) { + Logger.getLogger(c_user.class.getName()).log(Level.SEVERE, null, ex); + } + System.out.println("oke"); + view.dispose(); + + } + + } + + private class tolakListener implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + if (view.getTb_penyakit().getSelectedRow() == -1) { + JOptionPane.showMessageDialog(view, "Pilih Data Terlebih Dahulu"); + } else { + try { + model.update("status_penyakit='Ditolak' where id_penyakit=" + (String) view.getTb_penyakit().getValueAt(view.getTb_penyakit().getSelectedRow(), 0)); + view.buttontolak(true); + view.button(true); + view.setTable(model.getTablePenyakit()); + } catch (SQLException ex) { + Logger.getLogger(c_feedbackAdmin.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + + } +} diff --git a/src/tokomaterial/controller/c_gambar.java b/src/tokomaterial/controller/c_gambar.java new file mode 100644 index 0000000..a6dbc21 --- /dev/null +++ b/src/tokomaterial/controller/c_gambar.java @@ -0,0 +1,37 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import view.homeBaru; + +/** + * + * @author Muhammad Fahmy + */ +public class c_gambar { + + homeBaru home; + + public c_gambar(homeBaru home) { + this.home = home; + home.setVisible(true); + home.getBtnGambar().addActionListener(new btnGambar()); + + } + + private static class btnGambar implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + home.getGambar().setIcon(); + } + } + + + +} diff --git a/src/tokomaterial/controller/c_kontrak.java b/src/tokomaterial/controller/c_kontrak.java new file mode 100644 index 0000000..fe83b19 --- /dev/null +++ b/src/tokomaterial/controller/c_kontrak.java @@ -0,0 +1,143 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +import java.awt.Component; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JTextField; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; +import model.m_kontrak; +import model.m_user; +import view.datakontrak; +import view.homeAdmin; + +/** + * + * @author Vin + */ +public class c_kontrak { + + public datakontrak view; + public homeAdmin theView; + public m_kontrak model; + public static double bibit; + public static double pupuk; + + public c_kontrak(datakontrak view, m_kontrak model) throws SQLException { + this.model = model; + this.view = view; + view.setVisible(true); + view.addSaveListener(new saveListener()); + view.addDeleteListener(new hapusListener()); + view.addBackListener(new backListener()); + view.getLuas(new hitungLuas()); + view.setTable(model.getTableModel()); + view.setPetani(model.Petani()); + } + + private class hitungLuas implements KeyListener { + + @Override + public void keyTyped(KeyEvent e) { + } + + @Override + public void keyPressed(KeyEvent e) { + + } + + @Override + public void keyReleased(KeyEvent e) { + //rumus jumlah bibit internasional + //luas*(10000/2*10000/20)*(100*100)*(jml bibit/lubang)*(berat benih/1000 benih) +// bibit = ((getluas() * ((10000 / 20) * (10000 / 20))) * (100 / 90) * 3 * (130 / 1000)) +// hit pupuk = luas x (30kg/36)x100 +// pupuk = ((getluas()*(30/36))*100) + String regex = "[0-9]*\\.?[0-9]*";//untuk menggunakan parameternya + if (view.getLuas().getText().matches(regex)) { + bibit = ((Double.valueOf(view.getLuas().getText()) * (Math.pow(500, 2) * 0.9 * 0.39))); + view.getBibit().setText(Double.toString(bibit / 1000)); + pupuk = ((Double.valueOf(view.getLuas().getText()) * (0.83) * 100)); + view.getPupuk().setText(Double.toString(pupuk)); + } else { + view.getLuas().setText(""); + JOptionPane.showMessageDialog(view, "Silahkan Masukkan Angka dengan BENAR!1!!1"); + } + + } + } + + private class saveListener implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + model.idpetani((String) view.getPetani().getSelectedItem()); + model.save(m_kontrak.id + "," + view.getLuas().getText() + "," + view.getBibit().getText() + "," + view.getPupuk().getText()); +// System.out.println(m_kontrak.id + "," + view.getLuas().getText() + "," + view.getBibit().getText() + "," + view.getPupuk().getText()); + view.setTable(model.getTableModel()); +// view.setPetani(""); +// view.setLuas(""); + view.setBibit(""); + view.setPupuk(""); + view.text(true); + view.buttonsave(true); + view.button(true); + } catch (SQLException ex) { + Logger.getLogger(c_kontrak.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + + private class hapusListener implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + int baris = view.getSelectedRow(); + String idKontrak = view.getValueAt(baris, 0); + System.out.println(idKontrak); + model.delete(idKontrak); + view.setTable(model.getTableModel()); + } catch (SQLException ex) { + Logger.getLogger(c_kontrak.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + + private class backListener implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + homeAdmin a = new homeAdmin(); + a.setVisible(true); + + try { + c_menuAdmin theController = new c_menuAdmin(a, new m_user()); + } catch (SQLException ex) { + Logger.getLogger(c_user.class.getName()).log(Level.SEVERE, null, ex); + } + System.out.println("oke"); + view.dispose(); + } + } + + public void clear() { + view.setId(""); +// view.setPetani(""); +// view.setLuas(""); + view.setBibit(""); + view.setPupuk(""); + } +} diff --git a/src/tokomaterial/controller/c_kualitas.java b/src/tokomaterial/controller/c_kualitas.java new file mode 100644 index 0000000..4c3ef04 --- /dev/null +++ b/src/tokomaterial/controller/c_kualitas.java @@ -0,0 +1,1370 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import model.m_kualitas; +import model.m_user; +import view.PakarKualitas; +import view.homeAdmin; + +/** + * + * @author Vin + */ +public class c_kualitas { + + private m_kualitas theModel; + private PakarKualitas theView; + + public c_kualitas(PakarKualitas theView, m_kualitas theModel) throws SQLException { + this.theModel = theModel; + this.theView = theView; + theView.setVisible(true); + theView.check(new c_kualitas.check()); + theView.setComboPetani(theModel.getPetani()); + theView.setComboVarietas(theModel.getVarietas()); + theView.setComboMatang(theModel.getMatang()); + theView.setComboBobot(theModel.getBobot()); + theView.setComboCacat(theModel.getCacat()); + this.theView.addCekListener(new HasilPerformed()); + theView.backListener(new backListener()); + } + + private class backListener implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + homeAdmin a = new homeAdmin(); + a.setVisible(true); + + try { + c_menuAdmin theController = new c_menuAdmin(a, new m_user()); + } catch (SQLException ex) { + Logger.getLogger(c_user.class.getName()).log(Level.SEVERE, null, ex); + } + System.out.println("oke"); + theView.dispose(); + } + + } + + private class check implements ItemListener { + + @Override + public void itemStateChanged(ItemEvent e) { + try { + theModel.idpetani((String)theView.getPetani().getSelectedItem()); + theModel.idpetani(m_kualitas.luas); + theView.setLuas(m_kualitas.luas); + } catch (SQLException ex) { + Logger.getLogger(c_kualitas.class.getName()).log(Level.SEVERE, null, ex); +// } + } + } + } + + private class HasilPerformed implements ActionListener { + + @Override + public void actionPerformed(ActionEvent e) { + try { + if (theView.getVarietas().getSelectedIndex() == 0 || theView.getMatang().getSelectedIndex() == 0 || theView.getBobot().getSelectedIndex() == 0 || theView.getCacat().getSelectedIndex() == 0) { + theView.Message("Pastikan semua data terisi !"); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(1);//1 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(1);//2 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(1);//3 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(2);//4 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(1);//5 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(1);//6 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(1);//7 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(2);//8 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//9 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//10 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(2);//11 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(2);//12 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//13 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//14 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//15 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//16 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//17 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//18 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(1);//19 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(2);//20 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//21 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//22 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(2);//23 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(2);//24 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//25 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//26 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(2);//27 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//28 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//29 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//30 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//31 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//32 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//33 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//34 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(2);//35 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//36 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//37 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//38 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//39 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//40 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//41 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//42 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//43 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//44 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//45 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//46 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(4);//47 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//48 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//49 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//50 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(2);//51 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//52 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//53 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//54 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//55 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//56 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//57 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//58 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//59 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//60 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//61 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//62 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//63 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 1 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//64 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(1);//1 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(1);//2 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(1);//3 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(2);//4 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(1);//5 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//6 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(2);//7 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(2);//8 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//9 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//10 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(2);//11 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//12 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//13 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//14 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//15 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//16 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//17 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//18 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(1);//19 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(2);//20 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//21 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//22 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(2);//23 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//24 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//25 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//26 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//27 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//28 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//29 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//30 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//31 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//32 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//33 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//34 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(2);//35 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//36 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//37 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//38 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//39 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//40 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//41 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//42 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//43 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//44 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//45 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//46 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//47 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//48 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//49 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//50 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//51 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//52 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//53 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//54 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//55 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//56 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//57 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//58 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//59 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//60 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//61 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//62 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(4);//63 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 2 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//64 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(1);//1 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//2 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(2);//3 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(2);//4 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(1);//5 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//6 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(2);//7 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//8 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//9 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//10 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//11 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//12 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//13 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//14 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//15 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//16 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(1);//17 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//18 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//19 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//20 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//21 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//22 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//23 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//24 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//25 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//26 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//27 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//28 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//29 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//30 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(4);//31 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//32 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//33 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//34 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//35 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//36 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//37 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//38 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//39 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//40 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//41 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//42 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//43 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//44 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//45 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(4);//46 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(4);//47 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//48 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//49 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//50 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//51 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//52 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//53 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//54 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(4);//55 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//56 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//57 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(4);//58 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(4);//59 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//60 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(4);//61 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(4);//62 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(4);//63 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 3 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//64 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//1 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//2 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//3 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//4 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//5 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//6 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//7 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//8 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//9 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//10 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//11 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//12 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//13 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//14 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(4);//15 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 1 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//16 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//17 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//18 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//19 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//20 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//21 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(2);//22 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//23 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//24 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//25 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//26 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//27 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//28 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//29 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//30 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(4);//31 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 2 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//32 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(2);//33 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//34 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//35 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//36 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//37 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//38 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(4);//39 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//40 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//41 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(4);//42 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(4);//43 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//44 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//45 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(4);//46 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(4);//47 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 3 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//48 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//49 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//50 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(3);//51 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 1 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(3);//52 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(3);//53 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(3);//54 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(4);//55 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 2 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//56 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(4);//57 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(4);//58 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(4);//59 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 3 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//60 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 1) { + theModel.Pakar(4);//61 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 2) { + theModel.Pakar(4);//62 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 3) { + theModel.Pakar(4);//63 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } else if (theView.getVarietas().getSelectedIndex() == 4 && theView.getMatang().getSelectedIndex() == 4 + && theView.getBobot().getSelectedIndex() == 4 && theView.getCacat().getSelectedIndex() == 4) { + theModel.Pakar(4);//64 + theView.setMutu(theModel.getStatus().toString()); + theView.setTindakan(theModel.getTindakan().toString()); + } + } catch (Exception ex) { + Logger.getLogger(c_kualitas.class.getName()).log(Level.SEVERE, null, ex); + } + + } + } +} diff --git a/src/tokomaterial/controller/main.java b/src/tokomaterial/controller/main.java new file mode 100644 index 0000000..8cb3cd8 --- /dev/null +++ b/src/tokomaterial/controller/main.java @@ -0,0 +1,36 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package controller; + +//import model.AdminModel; +//import model.DBConnection; +//import model.ManagerModel; +//import view.LoginView; +//import view.TambahAdminView; + +import java.sql.SQLException; +import controller.LoginController; +import view.LoginView; +import model.LoginModel; + +/** + * + * @author World + */ +public class main { + + public static void main(String[] args) throws SQLException { + //new UserController(new LoginView(), new AdminModel(), new ManagerModel(), new TambahAdminView()); +// DBConnection db = new DBConnection(); +// db.connect(); + + + view.LoginView view = new LoginView(); + model.LoginModel model = new LoginModel(); + controller.LoginController control = new LoginController(model, view); + } + } + From e0d23fea8afc4d87d9aee00751fde0a57866c792 Mon Sep 17 00:00:00 2001 From: fahmy009 Date: Sat, 8 Oct 2022 17:59:27 +0700 Subject: [PATCH 2/2] update-controller-awal update-controller-awal oktober --- src/tokomaterial/controller/c_awal.java | 31 +++++++++++++++++++++ src/tokomaterial/controller/c_feedback.java | 6 ++++ 2 files changed, 37 insertions(+) diff --git a/src/tokomaterial/controller/c_awal.java b/src/tokomaterial/controller/c_awal.java index 6df2692..7a1e310 100644 --- a/src/tokomaterial/controller/c_awal.java +++ b/src/tokomaterial/controller/c_awal.java @@ -43,6 +43,37 @@ public void actionPerformed(ActionEvent e) { } } } + private class hitungLuas implements KeyListener { + + @Override + public void keyTyped(KeyEvent e) { + } + + @Override + public void keyPressed(KeyEvent e) { + + } + + @Override + public void keyReleased(KeyEvent e) { + //rumus jumlah bibit internasional + //luas*(10000/2*10000/20)*(100*100)*(jml bibit/lubang)*(berat benih/1000 benih) +// bibit = ((getluas() * ((10000 / 20) * (10000 / 20))) * (100 / 90) * 3 * (130 / 1000)) +// hit pupuk = luas x (30kg/36)x100 +// pupuk = ((getluas()*(30/36))*100) + String regex = "[0-9]*\\.?[0-9]*";//untuk menggunakan parameternya + if (view.getLuas().getText().matches(regex)) { + bibit = ((Double.valueOf(view.getLuas().getText()) * (Math.pow(500, 2) * 0.9 * 0.39))); + view.getBibit().setText(Double.toString(bibit / 1000)); + pupuk = ((Double.valueOf(view.getLuas().getText()) * (0.83) * 100)); + view.getPupuk().setText(Double.toString(pupuk)); + } else { + view.getLuas().setText(""); + JOptionPane.showMessageDialog(view, "Silahkan Masukkan Angka dengan BENAR!1!!1"); + } + + } + } private class v_about implements ActionListener { diff --git a/src/tokomaterial/controller/c_feedback.java b/src/tokomaterial/controller/c_feedback.java index 08e2333..dbb7e0e 100644 --- a/src/tokomaterial/controller/c_feedback.java +++ b/src/tokomaterial/controller/c_feedback.java @@ -63,6 +63,12 @@ public void actionPerformed(ActionEvent e) { } } +public c_gambar(homeBaru home) { + this.home = home; + home.setVisible(true); + home.getBtnGambar().addActionListener(new btnGambar()); + + } private class backListener implements ActionListener { @Override