public void acceptRequest(GameObject row, serviceRequestReceipt mechanicReciept) { row.transform.GetChild(7).GetComponent <Button> ().onClick.RemoveAllListeners(); print("accepted"); mechanicReciept.setStatus(1); row.transform.GetChild(8).GetComponent <Text> ().text = "Accepted"; mechanicReciept.mechanicId = activitymanager.getMechanicLoggedIn().getID(); loginactivity.saveReceipt(mechanicReciept.customerId, mechanicReciept); //activitymanager.getMechanicLoggedIn ().addServiceRequest (mechanicReciept); //activitymanager.serviceRequestReciepts.Remove (mechanicReciept); row.transform.GetChild(7).GetComponent <Button> ().onClick.AddListener(delegate { finishRequest(row, mechanicReciept); }); row.transform.GetChild(7).GetComponentInChildren <Text> ().text = "Finish"; //mechanicReciept.customer.serviceRequestReciepts.Contains (mechanicReciept).Equals(mechanicReciept); //Destroy (a); }
public void rateReciept(GameObject row, serviceRequestReceipt reciept) { //checking if rating or comment are empty if (!(row.transform.GetChild(6).GetComponent <InputField> ().text == "") & !(row.transform.GetChild(7).GetComponent <InputField> ().text == "")) { reciept.setRating(int.Parse(row.transform.GetChild(6).GetComponent <InputField> ().text)); reciept.comment = row.transform.GetChild(7).GetComponent <InputField> ().text; reciept.setHasReviewed(true); Destroy(row, 0); loginactivity.saveReceipt(reciept.customerId, reciept); } }