public Integer newTicket() {
		Database db = dbconnect();
                String noEmployee = null;
                Integer ticket_id = null;
		try {
		String query = "INSERT INTO ticket "
                        + "(customer_CID, employee_EID, CategoryID, StatusID ,"
                        + "Topic ,Problem ,Note, Solution, created_on, "
                        + "last_update) VALUES "
                        + "(?,?,?,?,?,?,?,?,?,?)";
                if (this.employee_EID != null) {
                    noEmployee = this.employee_EID.toString();
                }
		db.prepare(query);
                db.bind_param(1, this.customer_CID.toString());
                db.bind_param(2, noEmployee);
                db.bind_param(3, this.CategoryID.toString());
                db.bind_param(4, this.StatusID.toString());
                db.bind_param(5, this.Topic);
                db.bind_param(6, this.Problem);
                db.bind_param(7, this.Note);
                db.bind_param(8, this.Solution);
                db.bind_param(9, this.created_on);
                db.bind_param(10, this.last_update);
		db.executeUpdate();
                ticket_id = db.insert_id();
		db.close();
                
		} catch(SQLException e){	
			Error_Frame.Error(e.toString()); 
		}  
                return ticket_id;
        }