Exemplo n.º 1
0
        //Takes the details of a complaint object into a string array for display purposes
        private String[] printComplaint(String rn)
        {
            Complaint temp = cdb.retComplaint(db, rn);

            if (temp == null)
            {
                return(new String[] { "Complaint not found!", "Please check whether the entered reference number is correct." });
            }

            String[] r = new String[5];

            r[0] = "Complaint : " + temp.getType() + " - " + temp.getSub();
            r[1] = "Reference Number : " + temp.getReference();
            r[2] = "Submitted on : " + temp.getSubmit();
            r[3] = "Info  : " + temp.getAdd();

            if (temp.isCompleted())
            {
                r[4] = "Completed on : " + temp.getComplete();
            }
            else
            {
                r[4] = "Progress : " + temp.getProgress();
            }
            return(r);
        }
Exemplo n.º 2
0
 //Stores a Complaint object in the database
 public void storeComplaint(Water_Board_Management.Database d, Complaint cmp)
 {
     Water_Board_Management.ComplaintRow cr = new Water_Board_Management.ComplaintRow(cmp.getReference(), cmp.getAccount(), cmp.getType(), cmp.getSub(), cmp.getAdd(), cmp.isCompleted(), cmp.getSubmit(), cmp.getComplete(), cmp.getProgress(), cmp.getPriority());
     d.insert(cr);
 }
Exemplo n.º 3
0
 //Stores a Complaint object in the database
 public void storeComplaint(Water_Board_Management.Database d,Complaint cmp)
 {
     Water_Board_Management.ComplaintRow cr = new Water_Board_Management.ComplaintRow(cmp.getReference(), cmp.getAccount(), cmp.getType(), cmp.getSub(), cmp.getAdd(), cmp.isCompleted(), cmp.getSubmit(), cmp.getComplete(), cmp.getProgress(), cmp.getPriority());
     d.insert(cr);
 }