private void data_employee() { // String date = lb_date_baptism.getText(); String name = tf_search.getText(); if (name.isEmpty()) { return; } String year = "" + dp_year.getYear(); System.out.println(year); if (System.getProperty("version", "resto").equals("resto")) { loadData_baptism(S2_customers.ret_guest(name, year)); } else { loadData_baptism(S2_customers.ret_customers(name, year)); } }
private void do_edit_customer( String member_name, String address, String contact, String occupation, String income, String b_date, String civil_status, String is_male, String num, double balance, double credit_limit) { if (System.getProperty("version", "resto").equals("resto")) { S2_customers.edit_guest( member_name, address, contact, occupation, income, b_date, civil_status, is_male, num, balance, credit_limit); } else { S2_customers.edit_customer( member_name, address, contact, occupation, income, b_date, civil_status, is_male, num, balance, credit_limit); } data_employee(); }
private void pay3(List<to_cust_charges> cus) { for (to_cust_charges t : cus) { S2_customers.pay3(t.ci_number, t.or); data_charges(); } data_charges(); Prompt.call("PAYED"); }
private void data_charges() { // String date = lb_date_baptism.getText(); int row = tbl_cust.getSelectedRow(); if (row < 0) { return; } String num = tbl_cust.getModel().getValueAt(row, 1).toString(); // JOptionPane.showMessageDialog(null, num); loadData_charges(S2_customers.ret_charges(num)); compute_charges(); }
private void add_cust( String name, String add, String contact, String occupation, String income, String bday, String civil_status, String gender, double credit_limit) { S2_customers.add( name, add, contact, occupation, income, bday, civil_status, gender, credit_limit); data_employee(); }
private void pay(List<String> ci) { for (String aw : ci) { // String num = tbl_charges.getModel().getValueAt(row, 1).toString(); S2_customers.pay(aw); data_charges(); } JOptionPane.showMessageDialog(null, "Payed"); // int row = tbl_charges.getSelectedRow(); // if (row < 0) { // return; // } }
private void ok1() { int row = tbl_cust.getSelectedRow(); if (row < 0) { return; } final String num = tbl_cust.getModel().getValueAt(row, 1).toString(); final String names = tbl_cust.getModel().getValueAt(row, 0).toString(); final double balance = Double.parseDouble(tbl_cust.getModel().getValueAt(row, 2).toString()); String[] details = new String[3]; details = S2_customers.get_details(num); final String name = details[0]; final String add = details[1]; final String contact = details[2]; // final String name=details[0]; Window p = (Window) this; Dlg_credit_card nd = Dlg_credit_card.create(p, true); nd.setTitle(""); nd.do_pass(names, details[1], details[2], credit_amount, balance); nd.setCallback( new Dlg_credit_card.Callback() { @Override public void ok(CloseDialog closeDialog, Dlg_credit_card.OutputData data) { closeDialog.ok(); ok2(name, add, contact, credit_amount, data.to, data.pay_mode, num); disposed(); } @Override public void credit(CloseDialog closeDialog, Dlg_credit_card.OutputData data) { ok2(name, add, contact, credit_amount, data.to, data.pay_mode, num); // disposed(); } @Override public void prepaid(CloseDialog closeDialog, Dlg_credit_card.OutputData data) { ok2(name, add, contact, credit_amount, data.to, data.pay_mode, num); // disposed(); } }); Center.setCenter(nd); nd.setVisible(true); }
private void delete(String num) { S2_customers.delete(num); data_employee(); }
private void edit_customer() { int row = tbl_cust.getSelectedRow(); if (row < 0) { return; } final String num = tbl_cust.getModel().getValueAt(row, 1).toString(); // JOptionPane.showMessageDialog(null, to.b_date); Window p = (Window) this; Dlg_customers nd = Dlg_customers.create(p, true); nd.setTitle(""); if (System.getProperty("version", "resto").equals("resto")) { S2_customers.customers to = S2_customers.get_cust_guest(num); // System.out.println(to.member_name + " asdasd"); nd.do_pass( to.member_name, to.address, to.contact, to.occupation, to.income, to.b_date, to.civil_status, to.is_male, to.balance, num, to.credit_limit); } else { S2_customers.customers to = S2_customers.get_cust_details(num); nd.do_pass( to.member_name, to.address, to.contact, to.occupation, to.income, to.b_date, to.civil_status, to.is_male, to.balance, num, to.credit_limit); } nd.setCallback( new Dlg_customers.Callback() { @Override public void ok(CloseDialog closeDialog, Dlg_customers.OutputData data) { closeDialog.ok(); do_edit_customer( data.name, data.add, data.contact, data.occupation, data.income, data.bday, data.civil_status, data.gender, num, data.balance, data.credit_limit); } @Override public void balance(CloseDialog closeDialog, Dlg_customers.OutputData data) { data_employee(); int row = tbl_cust.getSelectedRow(); if (row < 0) { return; } String num = tbl_cust.getModel().getValueAt(row, 1).toString(); // JOptionPane.showMessageDialog(null, num); loadData_charges(S2_customers.ret_charges(num)); compute_charges(); } }); Center.setCenter(nd); nd.setVisible(true); }