/* * Pre: Feedback with current id must exist in the system * Post: Feedback is loaded */ public void LoadFeedback() { Feedback temp = DbInterfaceFeedback.LoadFeedback(this.id); if (temp != null) { this.name = temp.name; this.email = temp.email; this.feedbackType = temp.feedbackType; this.importance = temp.importance; this.functionality = temp.functionality; this.description = temp.description; this.assignedTo = temp.assignedTo; this.completed = temp.completed; this.dateEntered = temp.dateEntered; this.dateComplete = temp.dateComplete; } else { this.id = -1; } }
/* * Pre: * Post: Update the feedback in the database * @returns true if successful and false otherwise */ public bool Update() { return(DbInterfaceFeedback.UpdateFeedback(this)); }
/* * Pre: * Post: Add feedback data to database * @returns true if successful and false otherwise */ public bool AddToDatabase() { return(DbInterfaceFeedback.AddFeedback(name, email, feedbackType, importance, functionality, description)); }